Results 1 to 5 of 5

Thread: List Box Refresh

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Quetta-Pakistan
    Posts
    852

    List Box Refresh

    Hello

    I have selected 4th item in a listbox, i refresh ListBox and want to get the selected item which was selected before refresh.

    How to do this. Please help me

    Farooq

  2. #2
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: List Box Refresh

    Create a variable to remember the index of the selected item. At the end of the Refresh sub, add a line to select that index again.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Quetta-Pakistan
    Posts
    852

    Re: List Box Refresh

    What is the line that set index again ???

  4. #4
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: List Box Refresh

    You could add the INDEX to the ListBox.Tag property, and use that as a place holder to reset the selected item after the refresh (saves having to use an aditional varaiable etc)

  5. #5
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: List Box Refresh

    List1.ListIndex = List1.Tag

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