I am again kicking myself for trying to use a multiselect
listbox due to it's unreliable behavior. Here's my latest
discovery:

When the user selects, say 4 or 5 items in the list box
using Ctrl+Click, then tabs to another control or clicks
on another control, then tabs back to the listbox, all
of the previously selected items are cleared. Huh!?
How could this possibly be the desired behavior of this
control?

This happens in both VFP6 SP5 and VFP8 SP1. Haven't
tried it in the VFP9 beta yet.

Is the only way around this loss of user input to keep
a separate array of the selected items, then when the
control gets focus to re-select them? Then of course
you have the hassle of the difference between tabbing
to the list and clicking on the list... ugh.

-- TRW
_______________________________________
My e-mail: t r w 7
@ i x . n e t c o m . c o m
_______________________________________

Re: Multiselect Listbox woes by Jack

Jack
Wed Dec 01 00:16:03 CST 2004

On Wed, 01 Dec 2004 00:43:37 GMT, trw7at@ixdot.netcomdotcom (Tim
Witort) wrote:

>I am again kicking myself for trying to use a multiselect
>listbox due to it's unreliable behavior. Here's my latest
>discovery:
>
>When the user selects, say 4 or 5 items in the list box
>using Ctrl+Click, then tabs to another control or clicks
>on another control, then tabs back to the listbox, all
>of the previously selected items are cleared. Huh!?
>How could this possibly be the desired behavior of this
>control?
>
>This happens in both VFP6 SP5 and VFP8 SP1. Haven't
>tried it in the VFP9 beta yet.
>
>Is the only way around this loss of user input to keep
>a separate array of the selected items, then when the
>control gets focus to re-select them? Then of course
>you have the hassle of the difference between tabbing
>to the list and clicking on the list... ugh.

I have run into this too. I ended up building in support for saving
and re-selecting in my framework.

The last time I looked at this, it appeared to happen for
RowSourceType 2 and 6, but not for 0.


Re: Multiselect Listbox woes by Karen

Karen
Wed Dec 01 08:35:16 CST 2004

"Tim Witort" <trw7at@ixdot.netcomdotcom> wrote in message
news:Xns95B1AA588A6E0timwitortwrotethis@207.217.125.201...
> I am again kicking myself for trying to use a multiselect
> listbox due to it's unreliable behavior. Here's my latest
> discovery:
>
> When the user selects, say 4 or 5 items in the list box
> using Ctrl+Click, then tabs to another control or clicks
> on another control, then tabs back to the listbox, all
> of the previously selected items are cleared. Huh!?
> How could this possibly be the desired behavior of this
> control?
>
> This happens in both VFP6 SP5 and VFP8 SP1. Haven't
> tried it in the VFP9 beta yet.
>
> Is the only way around this loss of user input to keep
> a separate array of the selected items, then when the
> control gets focus to re-select them? Then of course
> you have the hassle of the difference between tabbing
> to the list and clicking on the list... ugh.
>
> -- TRW
> _______________________________________
> My e-mail: t r w 7
> @ i x . n e t c o m . c o m
> _______________________________________

I ran into this too with VFP 7 SP1. I ended up using a grid with no lines
and used a checkbox in the 1st column to select multiple items. It really
works great and makes it very obvious to the user which items they have
selected.

Karen



Re: Multiselect Listbox woes by trw7at

trw7at
Wed Dec 01 10:32:27 CST 2004

Karen seemed to utter in news:#Xei#L71EHA.3840@tk2msftngp13.phx.gbl:

> "Tim Witort" <trw7at@ixdot.netcomdotcom> wrote in message
> news:Xns95B1AA588A6E0timwitortwrotethis@207.217.125.201...
>> I am again kicking myself for trying to use a multiselect
>> listbox due to it's unreliable behavior. Here's my latest discovery:
>>
>> When the user selects, say 4 or 5 items in the list box
>> using Ctrl+Click, then tabs to another control or clicks
>> on another control, then tabs back to the listbox, all
>> of the previously selected items are cleared. Huh!?
>> How could this possibly be the desired behavior of this control?
>>
>> This happens in both VFP6 SP5 and VFP8 SP1. Haven't
>> tried it in the VFP9 beta yet.
>>
>> Is the only way around this loss of user input to keep
>> a separate array of the selected items, then when the
>> control gets focus to re-select them? Then of course
>> you have the hassle of the difference between tabbing
>> to the list and clicking on the list... ugh.
>>
>> -- TRW
>> _______________________________________
>> My e-mail: t r w 7
>> @ i x . n e t c o m . c o m
>> _______________________________________
>
> I ran into this too with VFP 7 SP1. I ended up using a grid with no
> lines and used a checkbox in the 1st column to select multiple items.
> It really works great and makes it very obvious to the user which items
> they have selected.
>
> Karen

I may end up having to use a grid. Unfortunately, then I
loose the native multiselect behaviors like Shift+Click
to select a whole series of items and a single click to
clear all selected items. I don't see a good alternative
since the listbox has other display issues as well.

Thanks for the input.

-- TRW
_______________________________________
My e-mail: t r w 7
@ i x . n e t c o m . c o m
_______________________________________

Re: Multiselect Listbox woes by David

David
Wed Dec 01 22:16:36 CST 2004

Tim,

If your listbox is RowSource'd to an array or you AddItem() the selection
items your multiselect will work fine.

--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro

"Tim Witort" <trw7at@ixdot.netcomdotcom> wrote in message
news:Xns95B1AA588A6E0timwitortwrotethis@207.217.125.201...
>I am again kicking myself for trying to use a multiselect
> listbox due to it's unreliable behavior. Here's my latest
> discovery:
>
> When the user selects, say 4 or 5 items in the list box
> using Ctrl+Click, then tabs to another control or clicks
> on another control, then tabs back to the listbox, all
> of the previously selected items are cleared. Huh!?
> How could this possibly be the desired behavior of this
> control?
>
> This happens in both VFP6 SP5 and VFP8 SP1. Haven't
> tried it in the VFP9 beta yet.
>
> Is the only way around this loss of user input to keep
> a separate array of the selected items, then when the
> control gets focus to re-select them? Then of course
> you have the hassle of the difference between tabbing
> to the list and clicking on the list... ugh.



Re: Multiselect Listbox woes by trw7at

trw7at
Thu Dec 02 12:02:09 CST 2004

David Frankenbach seemed to utter in
news:OuNk4WC2EHA.1152@TK2MSFTNGP14.phx.gbl:

> Tim,
>
> If your listbox is RowSource'd to an array or you AddItem() the
> selection items your multiselect will work fine.
>

Thanks, David. I'll keep that in mind next time. On this
one, I replaced the listbox with a grid.

-- TRW
_______________________________________
My e-mail: t r w 7
@ i x . n e t c o m . c o m
_______________________________________