General information
Category:
Forms & Form designer
Environment versions
Network:
Windows 2003 Server
>>>Try doing it after the form is activated.
>>
>>Naomi,
>>
>>Thanks for your suggestion. I just moved the code that selects items in the listbox into the Activate method.
>>
>>Same result: items are selected, but they are not highlighted.
>>
>>Jim
>
>Hmm.
>
>I remember I worked on this problem (with my then colleague Mike Asherman) almost 10 years ago. There was some trick employed (like using Listbox when or Click method), but I don't recall right now details and wonder if I can find the relevant code.
>
>However, I do have a class posted in Downloads section here that I think was based on that listbox with saved selections (although may be the class I posted is grid's modification instead).
>
>UPDATE. Looks like I only posted the multi-select grid version of the class and never posted the listbox based version (which was chiefly designed by Mike)
Naomi,
I have just added code at the end of the form's refresh method to lbSetFocus. and added code in the listbox Whenmethod to select items in the listbox. Running under the debugger, I can see that the items get highlighted as they get selected, however, when I leave the When method, the highlighting goes away.
Jim
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only