Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox woes
Message
From
12/06/2001 05:37:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
28/12/2000 13:19:38
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00457316
Message ID:
00518250
Views:
19
>Okay, I think I've narrowed down the problem, but I still can't solve it. My listbox loads properly with data from my table. I select multiple items and all is well. But if I deactivate and re-activate the form (i.e. by selecting another form and returning to the first one), the previously selected items in my listbox are no longer selected. How can I keep the items selected?

Elyse,
With rowsource fields record pointer follows table. You would have to individually set each selected(itemid)=.T. AND you wouldn't set focus to listbox. When user sets focus to listbox by any means (click, tab etc) he loses the selections. A workaround is to not usng a listbox but a grid. See MultiselectGrid here in downloads section or an enhanced version at www.foxyclasses.com . With grid all you need to set if a field flag.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform