Como dice el encabezado necesitamos cambiar el contenido de un TDockPnel en tiempo ejecución
Lo intente de la siguiente manera pero no funciona
Solo actualiza el titulo
- Code: Select all Expand view
function cambia()
.....
//Actualizamos el titulo del panel y tambien el contenido del mismo
oDock4 := TDockPnel():New( oWChCfCn )
:SetCaption( { | o | "Gestión configuración" } )
:SetCtrlsPnel( { | o, nT, nL, nH, nW | fGestionConfigura( o, nT, nL, nH, nW ) } )
END
...
Return nil
**************************
*GESTION DE LA INFORMACION
**************************
function fGestionConfigura( oP, nT, nL, nH, nW )
Local cQry := space(0)
Local oBrush,oSCtIn,oGCtIn,oGNmIn,oSCtIm,oGCtIm,oGNmIm,oSCtIc,oGCtIc,oGNmIc
Local oSApPr,oCApPr,oGVeFt,oGNmVe,oBtApl,oDlg,oFont,oFont1
Define Font oFont Name "Calibri" Size 0,-13
Define Font oFont1 Name "Calibri" Size 0,-13 BOLD
DEFINE BRUSH oBrush GRADIENT { { 1, CLR_WHITE, CLR_WHITE } }
if nTipoDlg == 1
DEFINE DIALOG oDlg STYLE (WS_POPUP) SIZE oP:nWidth , oP:nHeight OF oP PIXEL BRUSH oBrush
oDlg:nTop := 0
oDlg:nLeft := 0
oDlg:lHelpIcon := .F.
@ 7, 5 SAY oSCtIn VAR "Cta. Ingreso: " SIZE 50, 11 PIXEL OF oDlg UPDATE TRANSPARENT FONT oFont1
@ 5, 60 GET oGCtIn VAR cGCtIn SIZE 70, 11 PIXEL OF oDlg UPDATE BITMAP "Bbusc" ACTION EVAL(cbCuentaCnf,.T.,,1) PICTURE "@N" FONT oFont
@ 5, 133 GET oGNmIn VAR cGNmIn SIZE 180, 11 PIXEL OF oDlg UPDATE PICTURE "@N" FONT oFont
@ 22, 5 SAY oSCtIm VAR "Cta. Impuesto: " SIZE 50, 11 PIXEL OF oDlg UPDATE TRANSPARENT FONT oFont1
@ 20, 60 GET oGCtIm VAR cGCtIm SIZE 70, 11 PIXEL OF oDlg UPDATE BITMAP "Bbusc" ACTION EVAL(cbCuentaCnf,.T.,,2) PICTURE "@N" FONT oFont
@ 20, 133 GET oGNmIm VAR cGNmIm SIZE 180, 11 PIXEL OF oDlg UPDATE PICTURE "@N" FONT oFont
@ 37, 5 SAY oSCtIc VAR "Cta. Csc/Ban/Cja:" SIZE 50, 11 PIXEL OF oDlg UPDATE TRANSPARENT FONT oFont1
@ 35, 60 GET oGCtIc VAR cGCtIc SIZE 70, 11 PIXEL OF oDlg UPDATE BITMAP "Bbusc" ACTION EVAL(cbCuentaCnf,.T.,,3) PICTURE "@N" FONT oFont
@ 35, 133 GET oGNmIc VAR cGNmIc SIZE 180, 11 PIXEL OF oDlg UPDATE PICTURE "@N" FONT oFont
@ 52, 5 SAY oSApPr VAR "Grupo Afectar:" SIZE 50, 11 PIXEL OF oDlg UPDATE TRANSPARENT FONT oFont1
@ 50, 60 DBCOMBO oCApPr VAR nCApPr ITEMS aId LIST aIdLis SIZE 70,15 PIXEL OF oDlg FONT oFont
@ 50, 133 GET oGVeFt VAR cGVeFt SIZE 70, 11 PIXEL OF oDlg UPDATE PICTURE "@N" FONT oFont
@ 50, 205 GET oGNmVe VAR cGNmVe SIZE 108, 11 PIXEL OF oDlg UPDATE PICTURE "@N" FONT oFont
@ 65, 60 BUTTONBMP oBtApl OF oDlg PIXEL size 70, 13 RESOURCE oLamcla:cIcoSis PROMPT "&Aplicar" TEXTRIGHT
oGNmIn:disable()
oGNmIm:disable()
oGNmIc:disable()
oGNmVe:disable()
ACTIVATE DIALOG oDlg NOWAIT ON INIT (SetParent( oDlg:hWnd, oP:hWnd )) ON MOVE oDlg:Move( 0, 0, , , .T. )
elseif nTipoDlg == 2
DEFINE DIALOG oDlg STYLE (WS_POPUP) SIZE oP:nWidth , oP:nHeight OF oP PIXEL BRUSH oBrush
oDlg:nTop := 0
oDlg:nLeft := 0
oDlg:lHelpIcon := .F.
@ 7, 5 SAY oSCtOt VAR "Cta. Ingreso: " SIZE 50, 11 PIXEL OF oDlg UPDATE TRANSPARENT FONT oFont1
@ 5, 60 GET oGCtOt VAR cGCtOt SIZE 70, 11 PIXEL OF oDlg UPDATE BITMAP "Bbusc"
@ 5, 133 GET oGNmOt VAR cGNmOt SIZE 180, 11 PIXEL OF oDlg UPDATE PICTURE "@N" FONT oFont
@ 65, 60 BUTTONBMP oBtApl OF oDlg PIXEL size 70, 13 RESOURCE oLamcla:cIcoSis PROMPT "&Aplicar Rete" TEXTRIGHT
ACTIVATE DIALOG oDlg NOWAIT ON INIT (SetParent( oDlg:hWnd, oP:hWnd )) ON MOVE oDlg:Move( 0, 0, , , .T. )
endif
Return oDlg