Link to home
Start Free TrialLog in
Avatar of basilhs_s
basilhs_s

asked on

powerbuilder triggerevent example

Lets suppose that we have a window with two datawindow in it dw_1, dw_2 and two push buttons pb_1 pb_2.

pb_2 clicked event contains the following code
x1 = 1
dw_2.show()
dw_2.setfocus()


pb_1 clicked event contains the following code
x1 = 2
pb_2.triggerevent(clicked!)
messagebox("hi", string(x1))

my problem is that when i press pb1 button  pb2 clicked event is fired (x1 = 1) but dw_2 is receiving focus after the execution of messagebox command and not before it as i expected. Can i bypass this problem somehow (possibly with another technique)? i know than i can use a
responsed window containing dw_2 instead. i am interested in another solution if possible.


ASKER CERTIFIED SOLUTION
Avatar of MarkPTX
MarkPTX

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of basilhs_s
basilhs_s

ASKER

i used the messagebox to show that dw_2 receive the focus after the completion of pb1 clicked event.
thanks very much