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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Right Justify data in Listview control 1

Status
Not open for further replies.

JBG

Programmer
Oct 22, 2001
99
US
I would like to know how, if possible, to right justify data in a list view control.

Would anyone know if this is even possible?

Thanks in advance,

JBG
 
Hi,

at the end of the add of the columnheader, put either a 1 or 2 - can't remember which is which is which - I think 1 is to right justify and a 2 is to center

ie:
listviewname.ColumnHeaders.Add , , "Quantity", 1100, 1

hope this helps.
 
The constants you need for Zigs answer are

0 lvwColumnLeft
1 lvwColumnRight
2 lvwColumnCentre

Alternatively in design mode rightclick on the listview and go to property pages/column headers/alignment Let me know if this helps

Check out FAQ222-2244
 
Thanks for taking the time to help.THis is exactly what I needed.

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top