Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dragover and calling another method problems
Message
From
27/05/2006 21:03:00
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
To
27/05/2006 19:11:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01125469
Message ID:
01125539
Views:
27
>>>>>>I would like to have the following functionality. Drag an item from a listbox over a command button and fire the click event of the button. Is this possible?
>>>>>>
>>>>>>When I try it, the button's click event does not fire. I've put this.click() in the button's Dragover event. Am I missing something or is this simply not possible in VFP?
>>>>>>
>>>>>>TIA
>>>>>>Mike
>>>>>
>>>>>Yes, it's possible.
>>>>>
>>>>>You have to set properties of CommandButton: OLEDragMode = 1-Automatic, OLEDropMode = 1-Enabled. You have to put this.Click() in OLEDragOver.
>>>>
>>>>I tried you suggestion and it still does not work for me. Please remember that I'm trying to do this all within a VFP form, i.e. native VFP listbox and commandbutton.
>>>>
>>>>Do you have any sample code that you could share?
>>>
>>>You have to set also same properties in Listbox: OLEDragMode = 1-Automatic, OLEDropMode = 1-Enabled. In order to see from CommandButton item from Listbox put in Listbox.OLEStartDrag() reference to Listbox item. For example make PUBLIC variable gcItem = this.List[this.ListIndex] and then you can use that variable from CommandButton.
>>
>>I'm not so sure about the listbox OLEDrag stuff. I'd already tried that stuff before replying to your first suggestion and it made no difference. Also, according to Sergey, it won't trigger the control's click event.
>
>
>I have already done that! I don't whats the problem.

Neither do I. Is there anyway for you to provide me some sample code of what you've done to make this work?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform