Results 1 to 4 of 4

Thread: [RESOLVED] Listview column width

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Resolved [RESOLVED] Listview column width

    How do you modify a listview's column width at run time?
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  2. #2
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Listview column width

    VB Code:
    1. ListView1.ColumnHeaders.Item(1).Width = 3000
    ... or with a loop:
    VB Code:
    1. Dim lvwColumnHeader As ColumnHeader
    2.     For Each lvwColumnHeader In ListView1.ColumnHeaders
    3.         lvwColumnHeader.Width = 3000
    4.     Next
    ?

  3. #3

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Listview column width

    Quote Originally Posted by gavio
    VB Code:
    1. ListView1.ColumnHeaders.Item(1).Width = 3000
    ... or with a loop:
    VB Code:
    1. Dim lvwColumnHeader As ColumnHeader
    2.     For Each lvwColumnHeader In ListView1.ColumnHeaders
    3.         lvwColumnHeader.Width = 3000
    4.     Next
    ?
    Thanks

    EDIT: can't give you reputation... looks like I have been giving you some recently.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  4. #4
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Listview column width

    Quote Originally Posted by krtxmrtz
    Thanks

    EDIT: can't give you reputation... looks like I have been giving you some recently.
    That's not a problem for me... and btw, yes, you did

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width