trying to modify the layout of vertical list items

172 views
asked May 9, 2016 in GUI Development by JasonW
Currently , the items in my vertical list all show up with centered text.  I want them to all line up on the left side.  All of the layout settings i can find, related to the vertical list all seem to be set to align to left and align to top already  so I am not sure where I can make this modification.

1 Answer

+1 vote
answered May 10, 2016 by Paul Banach

The Layout property of the list determines only how the list itself should behave when its owner is resized. It doesn't affect the layout/alignment of the list items. Finally the list manages the items only without having exact information about the kind of the items. The list thus doesn't know whether and how the items can align their content.

You can, however, set the layout and evtl. alignment for every item explicitly when the item is loaded. The exact settings depend on the particular kind of the item. If you have a list using simple text views, then you can add the following row to the OnLoadItem method:

itemView.Alignment = Views::TextAlignment[ AlignHorzLeft, AlignVertCenter ];

This additional line instructs the the text views (used as list items in this case) to not center horizontally the text. Per default, text views align the text in the center/middle area.

 

 

 

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...