|
From: Baloghy G. <bal...@gm...> - 2014-11-09 13:05:00
|
Hi
I would like to call a nomodal window with some explanation text from
a when method of a get , then to close it from the valid.
There is below my wrong code.
Do you have some working solution?
Thank you in advance,
Gabor
#include "windows.ch"
#include "guilib.ch"
function main
INIT WINDOW oWin TITLE "Main window" SIZE 400,300
x1:=1
x2:=2
x3:=3
@ 20,20 get ox1 var x1 size 200,25 picture "999"
@ 20,50 get ox2 var x2 size 200,25 picture "999" when {||whelp("on")}
valid {||whelp("off")}
@ 20,80 get ox3 var x3 size 200,25 picture "999"
activate WINDOW oWin center
return nil
function whelp(p)
if p=="on"
INIT DIALOG owhelp AT 60,60 TITLE "Help" SIZE 200,100
@ 30,30 say "Text" size 100,25
activate dialog owhelp NOMODAL
hwg_setfocus(owin:ox2:handle)
elseif p=="off"
owhelp:close()
endif
return .t.
|