Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27355

VS 2010 [RESOLVED] How can I "Float" a listview column header to the right?

$
0
0
I have a listview box that contains 2 column headers "File Name" & "File Type". I have my form set to allow you to grow and shrink to the right. The listview grows and shrinks with it to the right. By default I have the columns populated using this code:
Code:

        ListView1.View = View.Details
        ' Add a column with width 80 and left alignment
        ListView1.Columns.Add("File Name", 306, HorizontalAlignment.Left)
        ListView1.Columns.Add("File Type", 70, HorizontalAlignment.Right)
        'ListView1.Columns.Add("Date Modified", 150, HorizontalAlignment.Left)

I tried to set the alignment to the right for column 2 but I see no difference. I have read a few other posts but I do not understand gridviews since I am new to programming. Most of my code is built around the listview so I would really like to find a solution to this using the listview controls options.

Thanks in advance.

Name:  after.png
Views: 64
Size:  70.8 KBName:  before.png
Views: 55
Size:  67.1 KB
Attached Images
  

Viewing all articles
Browse latest Browse all 27355

Trending Articles