Event handling

Event handling

Postby Natter » Tue Oct 06, 2020 12:14 pm

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 ?
Natter
 
Posts: 1182
Joined: Mon May 14, 2007 9:49 am

Re: Event handling

Postby cnavarro » Tue Oct 06, 2020 12:20 pm

Try with
oWindow:bLostFocus := { || ...... }
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6520
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Event handling

Postby Natter » Tue Oct 06, 2020 12:38 pm

Does not work. This is NOWAIT window
Natter
 
Posts: 1182
Joined: Mon May 14, 2007 9:49 am

Re: Event handling

Postby Natter » Tue Oct 06, 2020 1:01 pm

This works via bNcActivate
Natter
 
Posts: 1182
Joined: Mon May 14, 2007 9:49 am

Re: Event handling

Postby Antonio Linares » Tue Oct 06, 2020 3:16 pm

very good!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Event handling

Postby cnavarro » Tue Oct 06, 2020 4:57 pm

Can you give an example in your window control? Thank you
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6520
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Event handling

Postby Natter » Wed Oct 07, 2020 5:50 am

Something like this:

Code: Select all  Expand view
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
Natter
 
Posts: 1182
Joined: Mon May 14, 2007 9:49 am

Re: Event handling

Postby cnavarro » Wed Oct 07, 2020 9:38 am

Ok, but this not is a windows, is a dialog
Thanks
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6520
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests