I have a ListBox embedded in one of the tabs of a TabControl. I have this
control bound to one of my objects. Everything works fine, until I switch to
another tab, when I switch back to the ListBox all my selections are lost. I
am using SelectionMode = Multiselect. What can I do to prevent this??

Thanks in advance,

Daniel

Re: Problem with ListBox by hirf-spam-me-here

hirf-spam-me-here
Thu Jun 03 17:08:42 CDT 2004

* "Daniel Mantilla" <dmantill@i-com.com> scripsit:
> I have a ListBox embedded in one of the tabs of a TabControl. I have this
> control bound to one of my objects. Everything works fine, until I switch to
> another tab, when I switch back to the ListBox all my selections are lost. I
> am using SelectionMode = Multiselect. What can I do to prevent this??

You can try to place the control outside a tabpage and move it over the
tabpage at runtime. Then you can hide the control whenever the tabpage
his hidden and show it when the user switches to the tabpage (untested).

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Re: Problem with ListBox by Brian

Brian
Thu Jun 03 22:36:42 CDT 2004

This is a multi-part message in MIME format.

------=_NextPart_000_0013_01C449BB.3E5D9950
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Off the top of my head, how about saving the selected property(s) to a =
hash or an array. When that tab is loaded, load the listbox with the =
selected values.

--=20
Brian P. Hammer
"Daniel Mantilla" <dmantill@i-com.com> wrote in message =
news:efl2IMbSEHA.3844@TK2MSFTNGP11.phx.gbl...
I have a ListBox embedded in one of the tabs of a TabControl. I have =
this
control bound to one of my objects. Everything works fine, until I =
switch to
another tab, when I switch back to the ListBox all my selections are =
lost. I
am using SelectionMode =3D Multiselect. What can I do to prevent =
this??

Thanks in advance,

Daniel


------=_NextPart_000_0013_01C449BB.3E5D9950
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>Off the top of my head, how about saving the =
selected=20
property(s) to a hash or an array.&nbsp; When that tab is loaded, load =
the=20
listbox with the selected values.</FONT></DIV>
<DIV><BR>-- <BR>Brian P. Hammer</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Daniel Mantilla" &lt;<A=20
href=3D"mailto:dmantill@i-com.com">dmantill@i-com.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:efl2IMbSEHA.3844@TK2MSFTNGP11.phx.gbl">news:efl2IMbSEHA.3844=
@TK2MSFTNGP11.phx.gbl</A>...</DIV>I=20
have a ListBox embedded in one of the tabs of a TabControl. I have=20
this<BR>control bound to one of my objects. Everything works fine, =
until I=20
switch to<BR>another tab, when I switch back to the ListBox all my =
selections=20
are lost. I<BR>am using SelectionMode =3D Multiselect. What can I do =
to prevent=20
this??<BR><BR>Thanks in=20
advance,<BR><BR>Daniel<BR><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0013_01C449BB.3E5D9950--


Re: Problem with ListBox by Claes

Claes
Fri Jun 04 02:32:50 CDT 2004

Common problem with bound controls on tab pages. See
http://groups.google.se/groups?ie=UTF-8&as_umsgid=%23j2cHw%23LDHA.1612@TK2MS
FTNGP11.phx.gbl&lr=&hl=sv

/claes

"Daniel Mantilla" <dmantill@i-com.com> wrote in message
news:efl2IMbSEHA.3844@TK2MSFTNGP11.phx.gbl...
> I have a ListBox embedded in one of the tabs of a TabControl. I have this
> control bound to one of my objects. Everything works fine, until I switch
to
> another tab, when I switch back to the ListBox all my selections are lost.
I
> am using SelectionMode = Multiselect. What can I do to prevent this??
>
> Thanks in advance,
>
> Daniel
>
>