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 2 3 4 5 6 7 8 9 10 |
CommandButton lcb_button StaticText lst_info IF source.TypeOf() = CommandButton! THEN lcb_button = source lcb_button.Text = "You dropped a Button!" ELSEIF source.TypeOf() = StaticText! THEN lst_info = source lst_info.Text = "You dropped the text!" END IF |
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