Recent

Author Topic: TListBox not showing highlight when form opened a second time.  (Read 3421 times)

wpflum

  • Sr. Member
  • ****
  • Posts: 276
I have a popup form set to display a TListbox that is set to a default selection.  When I display the form the initial time the TListbox shows the default selection highlighted.  If I close the form and reopen it from the main form again the highlighting is gone or at least it is so light that it is almost imperceptible.  You can just make out that something might be there but it isn't what I would call highlighted.  I can tell it is doing something if I make the default be another selection the faint highlight moves to that selection after the reopening.  I've tried resetting the selection and redrawing it but nothing seems to work.


Any ideas??? 

lazguy

  • Jr. Member
  • **
  • Posts: 78
Re: TListBox not showing highlight when form opened a second time.
« Reply #1 on: September 01, 2010, 05:14:17 pm »
Try to set focus to your listbox in the OnShow event of your form.

wpflum

  • Sr. Member
  • ****
  • Posts: 276
Re: TListBox not showing highlight when form opened a second time.
« Reply #2 on: September 01, 2010, 05:20:08 pm »
Thanks, I missed that property when I tried scanning down the list.  Now it's working.

 

TinyPortal © 2005-2018