General information
Category:
Forms & Form designer
>Hi,
>My form has two textboxes,txtBoxA and txtBoxB. I would like to, at run time:
>1) Drag the data showing in txtBoxB and drop it on txtBoxA. What (which event) makes txtBoxB dragable?
>2) Which event in txtBoxA will accept the dropped data and update the value?
>2) Which event in txtBoxA can I put some code that will execute after the data is dropped there?
>
>Thanx! This is my first drag -n- drop programming task.
>John
I assume you want both text boxes to be editable and you want to be able to use drag-drop to copy text from one to the other. (If not, the interface could be improved over this.) Try this:
Text Box 1:
Edit double click method to say: THIS.Drag()
Text Box 2:
Edit DragDrop() method to read:
IF oSource.Name = "Text1" && or whatever your name is
THIS.Value = oSource.Value
THISFORM.Refresh
ENDIF
If Text1 were not editable, you could change its DragMode property to 1 (automatic) and then just a single click would start it dragging.
Go to property sheet, scroll to Drag, DragMode, DragDrop etc and hit F1 to check out discussion of these PEMs.
Randy
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only