none
ListBox doesn't show selection when loses focus

    Question

  •  

    I have a ListBox with a bunch of selected values in it.  When the ListBox has focus I can see the selections.  When the ListBox loses focus the selections disappear.  Any idea why this happens?

     

    Thanks!

    Monday, February 11, 2008 6:17 AM

Answers

  • Hi,

    Actually the selection is still there (albeit so grey you can hardly see it). If you want to change the brush for the selected items once the focus is lost, you have to restyle the listbox. See this thread for a discussion of the topic and an example for restyling.

    John
    Monday, February 11, 2008 7:36 AM

All replies

  • Hi,

    Actually the selection is still there (albeit so grey you can hardly see it). If you want to change the brush for the selected items once the focus is lost, you have to restyle the listbox. See this thread for a discussion of the topic and an example for restyling.

    John
    Monday, February 11, 2008 7:36 AM
  •  

    John,

     

    Thanks for that solution.  Over my remote desktop connection the light gray is not visible at all. It was very confusing!


    Brian

    Monday, February 11, 2008 2:38 PM