Little game of the day.


Little game of the day.

Put a TGridPanelLayout on a (FMX) form, select the first RowItem and fix it's Percent value to 10 :)

Workaround -> edit the FMX and set both row value at once

Comments

  1. It's as designed. It automatically averages the percentages between the number of rows. Does it need a better design? Probably.

    ReplyDelete
  2. It should be a weight then, not a percentage.

    ReplyDelete
  3. the problem is that the value is set, and then the average is made.

    Row[x] = Row[x] / Sum(Rows) * 100

    10 / (10 + 50) * 100 = 1,66666
    50 / (10 + 50) * 100= 83,3333

    this component need a custom editor to fix all the values at once.

    ReplyDelete
  4. .dfm view as text, edit to desired. Remember to total to 100.
    Err... that was VCL - can you view as text for FMX?

    ReplyDelete
  5. Lars Fosdal yes that's what I did to set 4 rows at 25%

    ReplyDelete
  6. TGridPanel on XE (only VCL) has the same behaviour, nothing new :-\

    ReplyDelete
  7. Or do it in code. Don't forget BeginUpdate/EndUpdate.

    ReplyDelete

Post a Comment