Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox highlight query
Message
From
05/04/2013 04:17:38
 
 
To
04/04/2013 13:27:22
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01570073
Message ID:
01570181
Views:
42
>>I have a listbox on a form, data supplied by 2 fields: descr, id . BoundColumn - 2. Control Source: Thisform.nID . BoundTo = .T. as I want the id number stored as the form property and not the index number of the chosen line.
>>
>>When I select a row in the listbox it highlights but as soon as the mouse is released the highlight clears. If I set BoundTo = .F. the behaviour is as I would like i.e. the selected row in the listbox remains highlighted.
>>
>>Any idea what I am doing wrong?
>
>I like to use properties as ControlSources, but over the years, I have run into issues with lists and combos when I do so. I can't say for sure, but this may be one of them.
>
>Try getting rid of the ControlSource and adding code to Valid to keep your property in synch.
>
>Tamar

Tamar, spot on! Removed the Controlsource and put code in the InteractiveChange to synch the form property and it works fine.
Many thanks
Barry.
Previous
Reply
Map
View

Click here to load this message in the networking platform