ListBox loses selection with focus

Discussion in 'Microsoft Dot NET Framework Forms' started by richie, Oct 21, 2003.

  1. richie

    richie Guest

    Is there an easy way to persist the selection of a ListBox after it loses its focus?

    Regards rich
     
    richie, Oct 21, 2003
    #1
    1. Advertisements

  2. richie

    Joe White Guest

    Huh? It *does* persist. ListBox doesn't even hide the selection when it
    loses focus (not by default, anyway).


    "richie" <> wrote in message
    news:...
    > Is there an easy way to persist the selection of a ListBox after it loses

    its focus?
    >
    > Regards rich
     
    Joe White, Oct 21, 2003
    #2
    1. Advertisements

  3. * (richie) scripsit:
    > Is there an easy way to persist the selection of a ListBox after it loses its focus?


    If you are talking about the List_View_ control: The selection persists,
    but you may want to set its 'HideSelection' property to 'False'.

    --
    Herfried K. Wagner
    MVP ยท VB Classic, VB.NET
    <http://www.mvps.org/dotnet>
     
    Herfried K. Wagner [MVP], Oct 21, 2003
    #3
  4. richie

    richie Guest

    lol... well these things just sort of happen when application grow bigger I guess!!

    I'll have to check a simple example and work on it from there.

    rich.

    "Joe White" <> wrote in message news:<>...
    > Huh? It *does* persist. ListBox doesn't even hide the selection when it
    > loses focus (not by default, anyway).
    >
    >
    > "richie" <> wrote in message
    > news:...
    > > Is there an easy way to persist the selection of a ListBox after it loses

    > its focus?
    > >
    > > Regards rich
     
    richie, Oct 22, 2003
    #4
  5. richie

    AlexS Guest

    Check HideSelection property.

    HTH
    Alex

    "richie" <> wrote in message
    news:...
    > lol... well these things just sort of happen when application grow bigger

    I guess!!
    >
    > I'll have to check a simple example and work on it from there.
    >
    > rich.
    >
    > "Joe White" <> wrote in message

    news:<>...
    > > Huh? It *does* persist. ListBox doesn't even hide the selection when

    it
    > > loses focus (not by default, anyway).
    > >
    > >
    > > "richie" <> wrote in message
    > > news:...
    > > > Is there an easy way to persist the selection of a ListBox after it

    loses
    > > its focus?
    > > >
    > > > Regards rich
     
    AlexS, Oct 23, 2003
    #5
  6. richie

    Joe White Guest

    ListBox doesn't have a HideSelection property.


    AlexS wrote:
    > Check HideSelection property.
    >
    > HTH
    > Alex
    >
    > "richie" <> wrote in message
    > news:...
    >
    >>lol... well these things just sort of happen when application grow bigger

    >
    > I guess!!
    >
    >>I'll have to check a simple example and work on it from there.
    >>
    >>rich.
    >>
    >>"Joe White" <> wrote in message

    >
    > news:<>...
    >
    >>>Huh? It *does* persist. ListBox doesn't even hide the selection when

    >>

    > it
    >
    >>>loses focus (not by default, anyway).
    >>>
    >>>
    >>>"richie" <> wrote in message
    >>>news:...
    >>>
    >>>>Is there an easy way to persist the selection of a ListBox after it
    >>>

    > loses
    >
    >>> its focus?
    >>>
    >>>>Regards rich
     
    Joe White, Oct 23, 2003
    #6
  7. richie

    AlexS Guest

    Sorry, my fault! Somehow my listboxes are now mostly ListViews.


    "Joe White" <> wrote in message
    news:...
    > ListBox doesn't have a HideSelection property.
    >
    >
    > AlexS wrote:
    > > Check HideSelection property.
    > >
    > > HTH
    > > Alex
    > >
    > > "richie" <> wrote in message
    > > news:...
    > >
    > >>lol... well these things just sort of happen when application grow

    bigger
    > >
    > > I guess!!
    > >
    > >>I'll have to check a simple example and work on it from there.
    > >>
    > >>rich.
    > >>
    > >>"Joe White" <> wrote in message

    > >
    > > news:<>...
    > >
    > >>>Huh? It *does* persist. ListBox doesn't even hide the selection when
    > >>

    > > it
    > >
    > >>>loses focus (not by default, anyway).
    > >>>
    > >>>
    > >>>"richie" <> wrote in message
    > >>>news:...
    > >>>
    > >>>>Is there an easy way to persist the selection of a ListBox after it
    > >>>

    > > loses
    > >
    > >>> its focus?
    > >>>
    > >>>>Regards rich

    >
     
    AlexS, Oct 24, 2003
    #7
    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. Tony Lin

    RightArrow loses focus rather than raising KeyDown event

    Tony Lin, Jun 30, 2003, in forum: Microsoft Dot NET Framework Forms
    Replies:
    2
    Views:
    669
    Tony Lin
    Jul 1, 2003
  2. RJ

    How can my Winform app tell when it loses focus to another app?

    RJ, Nov 14, 2003, in forum: Microsoft Dot NET Framework Forms
    Replies:
    1
    Views:
    301
    John Cottrell
    Nov 14, 2003
  3. bill
    Replies:
    2
    Views:
    245
  4. Phil Jones

    Consistently monitoring when a Form gets/loses focus.

    Phil Jones, Oct 25, 2004, in forum: Microsoft Dot NET Framework Forms
    Replies:
    3
    Views:
    271
    Jeffrey Tan[MSFT]
    Oct 26, 2004
  5. TF

    Main Form loses focus

    TF, Apr 15, 2005, in forum: Microsoft Dot NET Framework Forms
    Replies:
    1
    Views:
    730
    Mikhail Fedosov
    Apr 15, 2005
Loading...

Share This Page