Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Align listview

Status
Not open for further replies.

TysonLPrice

Programmer
Jan 8, 2003
859
US
I seem to be having trouble finding out how to right align the text in listview columns. We have common listview control at my shop and I need to align it at run time. Currently dollar values are left aligned. Alignment. doesn't have right as an option.
 
Is the program design/modify by you? Or it is the compiled state?

can you show me the code you are trying?
Listview don't support right align except default left align in the first column.



Zameer Abdulla
 
Never miind...I got it working.

Code:
For i = 0 To ListView1.Columns.Count - 1
            ListView1.Columns(i).TextAlign = HorizontalAlignment.Right
        Next

Listview don't support right align except default left align in the first column?????
 
I mean to say first column of the listview can't be aligned to right or center, it is default to left.


Zameer Abdulla
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top