Results 1 to 3 of 3

Thread: [RESOLVED] Display last added item in a listview

  1. #1

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

    Resolved [RESOLVED] Display last added item in a listview

    What's the equivalent to a msflexgrid's toprow property for a listview?
    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
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Display last added item in a listview

    Off the top of my head, I would use .Selected. Something like
    VB Code:
    1. Dim MyItem As ListItem
    2. Set MyItem = ListView1.ListItems.Add(, , "This is my line of text")
    3. MyItem.Selected = True
    4. MyItem.EnsureVisible
    5. Set MyItem = Nothing

  3. #3

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

    Re: Display last added item in a listview

    Quote Originally Posted by Hack
    Off the top of my head, I would use .Selected. Something like
    VB Code:
    1. Dim MyItem As ListItem
    2. Set MyItem = ListView1.ListItems.Add(, , "This is my line of text")
    3. MyItem.Selected = True
    4. MyItem.EnsureVisible
    5. Set MyItem = Nothing
    Yes!
    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)

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