Page 1 of 1
Event handling
Posted: Tue Oct 06, 2020 12:14 pm
by Natter
Hi,
A POUP window opens in my program. If I click outside of this window, it will be hidden. I need to perform some actions while hiding this POPUP window. How can I help you do this ?
Re: Event handling
Posted: Tue Oct 06, 2020 12:20 pm
by cnavarro
Try with
oWindow:bLostFocus := { || ...... }
Re: Event handling
Posted: Tue Oct 06, 2020 12:38 pm
by Natter
Does not work. This is NOWAIT window
Re: Event handling
Posted: Tue Oct 06, 2020 1:01 pm
by Natter
This works via bNcActivate
Re: Event handling
Posted: Tue Oct 06, 2020 3:16 pm
by Antonio Linares
very good!
Re: Event handling
Posted: Tue Oct 06, 2020 4:57 pm
by cnavarro
Can you give an example in your window control? Thank you
Re: Event handling
Posted: Wed Oct 07, 2020 5:50 am
by Natter
Something like this:
Code: Select all
DEFINE DIALOG oWin PIXEL STYLE nOR(WS_POPUP) BRUSH oBru TRANSPARENT
ACTIVATE DIALOG oWin ON INIT Win_Ini()
procedure Win_Ini
DEFINE DIALOG oDlg PIXEL STYLE nOR(WS_POPUP) OF oWin
ACTIVATE DIALOG oDlg NOWAIT
oDlg:bNcActivate = { | lOnOff | iif( lOnOff, , MyFunction())}
return
Re: Event handling
Posted: Wed Oct 07, 2020 9:38 am
by cnavarro
Ok, but this not is a windows, is a dialog
Thanks