Listview

Discussion in 'Microsoft VB .NET' started by zulander@gmail.com, Jul 20, 2006.

  1. Guest

    Is there a way to set a index of a item when you add ? i want to add
    the item at the index 0, which mean everytime i would i it would be at
    the top of the list


    Dim xitem As ListViewItem
    xitem = lv.Items.Add("HELLO")
    xitem=nothing

    thank you
     
    , Jul 20, 2006
    #1
    1. Advertisements

  2. <> schrieb:
    > Is there a way to set a index of a item when you add ? i want to add
    > the item at the index 0, which mean everytime i would i it would be at
    > the top of the list


    You may want to use 'ListView.Items.Insert' to insert the item at a specific
    position.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>
     
    Herfried K. Wagner [MVP], Jul 21, 2006
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luke Zhang [MSFT]

    RE: Disable only ListView horizontal scroll bar

    Luke Zhang [MSFT], Jul 10, 2003, in forum: Microsoft VB .NET
    Replies:
    0
    Views:
    2,549
    Luke Zhang [MSFT]
    Jul 10, 2003
  2. Replies:
    1
    Views:
    945
  3. Mike Dyer

    Using the new listview

    Mike Dyer, Jul 31, 2003, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    548
  4. Peter
    Replies:
    0
    Views:
    360
    Peter
    Feb 24, 2005
  5. Rita
    Replies:
    0
    Views:
    386
Loading...

Share This Page