Hi!
It is not possible by direct way, and solution with MouseDown is not a good one.
We used anotehr solution - create an array that is parallel to List array. In this array we store status of each list item. Then synchronize list items accordingly. This is specially useful for case when list box is disabled/enabled. When list box is disabled/enabled, disable status of particular list item got lost, so we required to restore it. For this purpose, item status array is also very useful.
It is good to make a list box class that have such functionality and maintains item status array automatically.
You can also search UT messages - there was a thread about this some time ago, with exactly the same solution.
HTH.
>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.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.