on 09-18-2014 6:42 PM
I want to dragadrop for a listbox. I enable property DragAuto. Then the drogdrop is for the whole listbox, And I can't select any item in the listbox anymore.
but I want dragdrop for single selected item. How to to it?
Hi Kent;
You would need to use the "manual drag" feature of PB.
1) Make sure Drag Auto is OFF
2) Add a User Event and map it to the MouseMove message (pbm_mousemove)
3) On the UserEvent ... use the DRAG ( ) method as follows ...
//Check to see if mouse button is down
If flags = 1 Then
This.Drag( Begin!)
End If
This should leave the normal behavior of the DDLB alone until an actual dragging action is started by the user.
HTH
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Easy ...
1) Use the DragDrop Event
2) Add code to see what was dropped ...
For example - save DDLB's TAG in the dropped objects TEXT property
CHOOSE case source.Typeof ( )
case DropDownListBox!
DropDownListBox lo_dddlb
lo_dddlb = Source
THIS.tag = lo_dddlb.text
case else
MessageBox ("Ouch", "Wrong object!")
end choose
HTH
Regards .. Chris
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.