Vertical Alignment in a List

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Vertical Alignment in a List

Post by soa »

I have a list with a RP which can expand to multiple lines depending up the content. With the other cells on a line I want the content aligned to the top of the cell (rather the centre). I can't seem to find a VerticalAligment property. I've tried CellAlignment but it doesn't do anything for me.
User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: Vertical Alignment in a List

Post by Stewart Marshall »

Cells in a list are basically edit controls, and as there's no vertical alignment for an edit, no such feature exists in a list either.

CellAlignment can be used to control the position of the edit within a cell. However, as per the help, "When CellSizing is FitBoth, the contents of the cell will fill the space and this property has no effect."

The solution is to change CellSizing to FitWidth. This will ensure it fits within the column correctly, with the height of the edit being governed by the CellHeight property. Then change the CellAlignment to TopCenter and you should get the effect that you're after.


Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Re: Vertical Alignment in a List

Post by soa »

Thanks, worked perfectly.
Post Reply