controls on dialog init/not init
Posted: Wed Jul 01, 2015 8:28 am
hello,
I have those 2 samples:
that produce:
that produce:
I usually use the second code.
I tried for 5 minutes to find why, but I was not able to found it.
Regards,
Antonino
I have those 2 samples:
Code: Select all
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg, cFirst := "Hello", cLast := "World"
DEFINE DIALOG oDlg SIZE 500, 250
@ 1, 1 GET cFirst OF oDlg SIZE 80, 10
@ 2, 1 GET cLast OF oDlg SIZE 80, 10
@ 5, 11 BUTTON "Ok" ACTION MsgInfo( cFirst + ", " + cLast )
@ 5, 21 BUTTON "Cancel" ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
return nil
Code: Select all
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg
DEFINE DIALOG oDlg SIZE 500, 250
ACTIVATE DIALOG oDlg CENTERED ON INIT init(oDlg)
return nil
PROC init(oDlg)
local cFirst := "Hello", cLast := "World"
@ 1, 1 GET cFirst OF oDlg SIZE 80, 10
@ 2, 1 GET cLast OF oDlg SIZE 80, 10
@ 5, 11 BUTTON "Ok" ACTION MsgInfo( cFirst + ", " + cLast )
@ 5, 21 BUTTON "Cancel" ACTION oDlg:End()
return
I usually use the second code.
I tried for 5 minutes to find why, but I was not able to found it.
Regards,
Antonino