Seems that FMX has some weird alignment logic.
Seems that FMX has some weird alignment logic.
I cannot look closely at the moment, but it seems that it calculates alignment order based on original x (y) position of child control and its width (height) and documentation states that alignment can change control position and size.
There is also question of what happens if you change content of child control - ordering may be changed.
Is this a bug or what?
http://stackoverflow.com/q/44084850/4267244
I cannot look closely at the moment, but it seems that it calculates alignment order based on original x (y) position of child control and its width (height) and documentation states that alignment can change control position and size.
There is also question of what happens if you change content of child control - ordering may be changed.
Is this a bug or what?
http://stackoverflow.com/q/44084850/4267244
This link has some answers (if you loop through the controls and change their X/Y properties as needed to create the right order). I agree it's annoying how the order can change seeming at random.
ReplyDeletestackoverflow.com - alignment - Delphi: How to programmatically adjust visual ordering of components with align = alTop - Stack Overflow
Eli M That link is for VCL and not FMX.
ReplyDeleteAlso main problem is not in manual positioning of controls but automatic one. What is the point in having automatic alignment if you have to manually adjust it.
FMX alignment code is weird at best, most likely it is just plain buggy. But I cannot debug it myself at the moment, if I could I would also post QP report along with possible solution.
May be but I used the solution from it in FMX and it worked.
ReplyDelete