How to Refresh component and it’s childrens size in Delphi XE8


I have a firemonkey project. With a TListbox which is set to align client and the TListBoxItems in the listbox has a few buttons. These buttons have an align right.

When the form is created I set the size of the buttons and at form resize i also set the size again in order to check for screen rotation.

My problem:

First time I go open the form the sizes of the buttons aren’t correct. If i than change the screen orientation the buttons get the right size and i can change back to the original orientation and the size is correct. So only initially they have an incorrect size. Can I refresh the ListBox or screen so it’s sets the right sizes? I also have tried to set the size of the buttons in formActivate and formShow but both don’t work eather.

Comments are closed.