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

Is it possible to right align in a listview ?

Status
Not open for further replies.

GAORR

Programmer
Nov 22, 2001
48
CA
I'd like to be able to right align data in a listview. Is this possible ?

Thanks
 
Found the answer. The alignment is set when the columnheader is added.

ie: lvListView.ColumnHeaders.Add , , "Cost", 750, 1

the last 1 is for right alignment
2 is for centered
the default (left blank) is left aligned

Thanks
 
Set the Alignment Property during the ColumnHeaders.Add method to lvwColumnRight ( or lvwColumnCenter, lvwColumnCenter)


lstServerfiles.ColumnHeaders.Add , , "FileSize", lstServerfiles.Width / 3, lvwColumnRight



Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top