Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you select items in a listbox by value?
Message
From
14/12/2000 15:08:01
 
 
To
14/12/2000 14:47:28
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00453572
Message ID:
00453584
Views:
21
>Do you have the control source set too? The RowSource defines the list, the ControlSource is the value of that list. If it is set, do you refresh() it after moving the pointer?

I had the ControlSource set, but when I select a value in the listbox, the pointer in the listbox keeps jumping to the top of the list... it's really weird. So I had to clear the ControlSource and now set thisform.cCoName = this.value in the InteractiveChange...

As the user moves through the listbox containing company names, textboxes on the form display other info about the company. The problem comes when I add a new company to the table. After the company gets added to the table, I would like the listbox to jump to that new value after issuing a refresh. The only way I could figure to do this now, was to try and select the new company's name in the listbox directly... without knowing the nIndex or ItemID that is...

If I can't figure out why the list selection jumps to the top when a ControlSource is set, I'll give Trey's suggestion a try...

- Brian


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform