Home > Archive > FoxPro Help and Support > October 2005 > limit the number selections in a listbox









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author limit the number selections in a listbox
ghj

2005-10-27, 8:34 am

Is there a way to limit the number of selected items (lets say 20) of a
multi-select listbox. I tried putting code in the click event, but it does
not work when the user holds the shift key and selects a group of list
items.

Thanks


Jack Jackson

2005-10-27, 8:34 am

On Thu, 20 Oct 2005 22:51:14 GMT, "ghj" <ghj@ghj.com> wrote:

>Is there a way to limit the number of selected items (lets say 20) of a
>multi-select listbox. I tried putting code in the click event, but it does
>not work when the user holds the shift key and selects a group of list
>items.


No. You would have to put code in to count the number of selected
items, but then what would you do if the user selected 30 as a group?

I think it would be better to let the user select anything, then check
at the time you process the selections and give an error if too many
are selected.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com