Identifying the dragged control
To identify the type of control that was dropped, use the
source argument of the DragDrop event.
This script for the DragDrop event in a picture declares two
variables, then determines the type of object that was dropped:
1 |
CommandButton lcb_button |
1 |
StaticText lst_info |
1 |
1 |
IF source.TypeOf() = CommandButton! THEN |
1 |
lcb_button = source |
1 |
lcb_button.Text = "You dropped a Button!" |
1 |
ELSEIF source.TypeOf() = StaticText! THEN |
1 |
lst_info = source |
1 |
lst_info.Text = "You dropped the text!" |
1 |
END IF<i></i> |
Using CHOOSE CASE If your window has a large number of controls that can be
dropped, use a CHOOSE CASE statement.
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest