No clue really, Andrew
However, if you could really check if selection (check collection count and
items) is really lost when focus is moved.
It could be just redraw issue.
About activation - do you mean Activate event handler?
I use mostly ListView, which doesn't lose selection(s) when focus is lost.
Listbox should be also stable.
Maybe you can simplify sample and post code illustrating problem?
HTH
Alex
"Andrew" <tr******@hotmail.com> wrote in message
news:Ch*********************@news20.bellglobal.com ...
Tried that already, doesn't seem to work. Actually, I tried loading it
upon activation and that only worked once I changed the focus to the tabpage
where the listbox was. I thought that fixed it but it turns out as soon
as the listbox loses focus all but one of the selections gets unselected (I
have it on multi-simple).
Andrew
"AlexS" <sa***********@SPAMsympaticoPLEASE.ca> wrote in message
news:OV**************@tk2msftngp13.phx.gbl... Maybe you should move your pre-selection code into Load event?
HTH
Alex
"Andrew" <tr******@hotmail.com> wrote in message
news:b7*********************@news20.bellglobal.com ... I'm having a major problem with a databound listbox in C#. In the
constructor for the form I am trying to pre-select some of the items based in information in the database. When I step through the debugger it
all seems to be working properly until the Load function is called, and
then all my selections but 1 are unselected. Anybody had any experience with
this and know of a fix?
Listbox is databound
Listbox appears on a tabpage inside a tabcontrol, inside a form
SetSelected works in contructor
All but one item unselected at beginning of load
Thanks for any help,
Andrew