I am having problems with FOCUS handlig in the MDI :
Code: Select all
#INCLUDE "dcdialog.ch"
FUNCTION TestnaOkna()
LOCAL GetList[0] ,i
PRIVATE aRRW, nW ,oWindowB
m->aRRw:={}
m->nW:=1
@ 0,10 DCPUSHBUTTON CAPTION 'Novo okno' ;
SIZE 20,3 ;
ACTION {||m->nW++, WindowB()}
DCREAD GUI FIT TITLE 'Window A' //EVAL {|o|M->oWindowA := o, WindowB()}
for i:=1 to len(m->arrW)
IF Valtype(M->arrW[i,1]) == 'O'
M->arrW[i,1]:destroy()
ENDIF
next
//wtf 'stop' pause
RETURN nil
* -----------
FUNCTION WindowB()
LOCAL GetList[0], GetOptions, oDlg, nnW:=m->nW
@ 0,0 DCSAY 'This is Window B '+strZero(nnW,4) SAYSIZE 0 FONT '9.Arial Bold'
DCGETOPTIONS WINDOWROW 700 WINDOWCOL 900
DCREAD GUI FIT TITLE 'Window B '+strZero(m->nW,4) ;
OPTIONS GetOptions ;
PARENT @oDlg ;
EXIT
aaDD(m->aRRw,{oDlg,nnW})
oDlg:close := {|a,b,o|o:destroy(),M->aRRW[nnW,1] := nil }
RETURN nil
I beleive there is a trivial solution, which I can't find it by myself.
I would appreciate your answer.
Thanks
Janko