Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How many items in a list box?
Message
 
To
05/11/1996 18:05:50
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00011537
Message ID:
00012014
Views:
37
>>How can I programatically determine how many items will be in a list box based upon the size of the list box and the current font?
>>
>>I'm trying to create a "filing cabinet" for records in my app, and I want to let users drag-and-drop items from one folder to another.
>>
>>I have the list of folders on the left, and the records on the right. I want a user to be able to select a folder, then highlight one or more records, and drag them into a new folder. To do this, I need to know which item in the folders list box the drag-and-drop ended in.
>>
>>I know that I have the x and y coordinates of this value, but how can I figure out which row this point falls in?
>>
>>Thanks for any suggestions anyone can give
>>
>>--Sam
>
>I presume that you finish the user drag/drop cycle in MouseUp event
>of Listbox containign folder names. So you have to prolong the 'cycle'
>and 'click mouse' (use MOUSE command) immediately in the same snippet.
>After this you have to check click event (if fired) and get selected item
>IndexId which you will use to identify folder.

Thanks for the help.

I think I understand what you are suggesting, but I've tried playing around with it, and I can't get FoxPro to do the MOUSE command, and then check the new selected item. I've tried using stuff in the MouseUp method, the Click method, and the DragDrop method (and many combinations), but I can't get it to work. Would it be possible for you to share a small code snippet? I am really perplexed as to how FoxPro wants to work.

Thanks again!

--Sam
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform