|
From: Maurizio la C. <m.l...@gm...> - 2013-12-07 08:57:00
|
Hi,
button it's just a simple control supporting only the press event.
The ownerbutton was built just to manage also the get/lostfocus methods and
more.
I had your similar need and the only way to trap the wanted events was to
use ownerbutton instead of button.
BR
Maurizio
Il 07/dic/2013 09:35 "Baloghy Gábor" <bal...@gm...> ha scritto:
> Hello,
>
> I do not understand why does not work getfocus/lostfocus method of a
> button control.
> In get,ownerbutton and other controls the lostfocus and getfocus work,
> in button control does not.
> There is an example prg.
>
> Thanks for your help,
>
> Gabor
>
> #include "windows.ch"
> #include "guilib.ch"
>
> FUNCTION Main
> LOCAL v1:=SPACE(10)
>
> INIT WINDOW oMainWindow MAIN TITLE "HWGUI lostfocus test" AT 0,0 SIZE
> 400,300
>
> @ 150,40 GET oGet1 VAR v1 SIZE 100,30
> @ 150,100 BUTTON oButton1 CAPTION "Button1" SIZE 100,30
> @ 150,160 OWNERBUTTON oOwnbutton1 TEXT "OwnerButton1" SIZE 100,30
>
> oGet1:blostfocus:={||hwg_msginfo("lost get1"),.T.}
> oButton1:blostfocus:={||hwg_msginfo("lost button1"),.T.}
> oOwnButton1:blostfocus:={||hwg_msginfo("lost ownerbutton1"),.T.}
>
> ACTIVATE WINDOW oMainWindow CENTER
>
> RETURN NIL
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
>
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Hwgui-developers mailing list
> Hwg...@li...
> https://lists.sourceforge.net/lists/listinfo/hwgui-developers
>
|