Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to find out if item is disabled in a listbox?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00741505
Message ID:
00741558
Views:
18
I do not use drag and drop on my mover list boxes, however, this seems to work for disabled items when fired by a button or double click.

*** aryAvailableValues = RowSource
*** AvailableValue = ControlSource

*** Move the hightlighted Available value to the Selected list
*** If Item is Disabled, ignore it
IF SUBSTR(aryAvailableValues(AvailableValue,1),1,1) <> "\"

*** Code to move selected item from one list to the other

ENDIF

>Hi everybody,
>
>At first, this question looks trivial. However, there is no native property of the listbox, which would tell, if the item is enabled/disabled. The question was arised on Russian VFP Club Forum. My first idea was to check, if the List(i) starts with \. However, according to the person, who asked this question, this doesn't work.
>
>Do you have other ideas?
>
>=================================
>The background of the problem: ListBox is used as the source for Drag&Drop. Once the item is moved, he adds \ to make it disabled. If he puts a mouse cursor on the disabled line and starts to move it, selected(i) returns .t. So, how to find out, that the item is disabled?
>
>Thanks in advance.
Dennis Lindeman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform