Home > Software engineering >  Firemonkey Listview & mobile screen orientation in Delphi 11
Firemonkey Listview & mobile screen orientation in Delphi 11

Time:12-23

I am fairly new to the Firemonkey framework after working with VCL for many years so hopefully this question is not too simple.

I am listing Dynamic Listview Items which I update from a database. I have created the position/layout of the text within the Listview Item using design mode . My question is when I change screen orientation from portrait to landscape do I have to manually change the 'X' position of the text items located within my listview and their width so that the full landscape width of the screen is utilized? There appears to be no anchors for dynamically created Listview items. (The text items just have their generic names for the time being.)

I have a pic below of what I am trying to describe. First pic shows deign mode in portrait and second in landscape.

Any suggestions greatly appreciated.

Portrait mode

Landscape mode

CodePudding user response:

The Accessory, Detail and Text items have an Align property that can take values Center, Leading or Trailing. They are recalculated and adjust their position with changes in the screen orientation.

Additionally some items have a separate property, TextAlign, which sets the position for a text within the space of the Align result.

  • Related