4
votes

I have previously been using VGScene (Firemonkey predecessor) to create an application and have recently switched to Delphi XE2's Firemonkey.

To scale my form in VGScene all I had to do was to scale the Root object of the VGScene object to scale all content in the form. However I am unsure how this should be done using FireMonkey.

My form consists of two TLayouts, one left aligned and one set to Client align, with a vertical splitter control between the left and client layouts. The client layout also has a list box on it set to client alignment.

I have tried having a base TLayout with all my controls on it, and scaling the base TLayout but this doesn't quite work properly, the left layout scales properly, but the client layout's listbox seem to extend past the right and bottom edge of the client layout object? i.e. when you have a full list the list items extend past the right edge of the form, (which are cut off) and the vertical scrollbar isn't shown completely either as it extends past the bottom of the form. It is as though the client layout's width and height are scaled to that larger than the form allows, but should it not still fill the form's area?

I have tried to just scale the individual object's, like just scaling the listbox, but this produces the same result, the listbox extends past the bounds of the form.

Anyone have any ideas?

1

1 Answers

0
votes

One possibility is that you didn't quite follow exactly the instructions for laying out your controls and splitter, as recommended on the TSplitter documentation?

If you didn't, it is easy to get to a point where all the properties seem to be set to the right values, but somehow the controls and splitter just don't cooperate. I would recommend trying again, paying careful attention to getting the align properties with the correct values, i.e. alLeft on the left component, alLeft on the splitter, and alClient on the right component.