Listbox Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roy Riddex

    #1

    Listbox Question

    When you select something from a listbox it becomes highlighted. How do you
    remove the highlight without removing the data from the listbox? I see there
    is a 'Selected' property for listboxes but I can't work this one out. Any
    help is appreciated.

    Roy


  • Olof Lagerkvist

    #2
    Re: Listbox Question

    Roy Riddex wrote:
    [color=blue]
    > When you select something from a listbox it becomes highlighted. How do you
    > remove the highlight without removing the data from the listbox? I see there
    > is a 'Selected' property for listboxes but I can't work this one out. Any
    > help is appreciated.[/color]

    On way is
    List1.Selected( List1.ListIndex ) = False

    --
    Olof Lagerkvist
    ICQ: 724451
    Web page: http://here.is/olof

    Comment

    • Olof Lagerkvist

      #3
      Re: Listbox Question

      Olof Lagerkvist wrote:
      [color=blue]
      > Roy Riddex wrote:
      >[color=green]
      >> When you select something from a listbox it becomes highlighted. How
      >> do you
      >> remove the highlight without removing the data from the listbox? I see
      >> there
      >> is a 'Selected' property for listboxes but I can't work this one out. Any
      >> help is appreciated.[/color]
      >
      >
      > On way is
      > List1.Selected( List1.ListIndex ) = False[/color]

      A better way is not to use the Selected property at all,
      List1.ListIndex = -1

      --
      Olof Lagerkvist
      ICQ: 724451
      Web page: http://here.is/olof

      Comment

      • Roy Riddex

        #4
        Re: Listbox Question

        Very simple. Thank you for your help.

        Roy


        Comment

        • Bruce A. Wilkinson

          #5
          Re: Listbox Question

          Try This

          list1.selected( 5) = false

          The number in brackets represents the ListIndex of the item within the
          control.


          Comment

          Working...