Estoy intentando colocar un TDockPnel sobre un dialogo, pero no logro el mismo resultado.
- Code: Select all Expand view
Function TestDockPnel()
local nCol
local nRow
Local nTotLargo := 0
Local cUrl := "http://forums.fivetechsupport.com/viewforum.php?f=6"
Local nAncFinal := 0
Local nAltFinal := 0
nWAncho := Int( GetSysMetrics( 0 ) * 0.95 )
nWAlto := Int( GetSysMetrics( 1 ) * 0.95 )
nCol := Int( ( GetSysMetrics( 0 ) - nWAncho ) / 2 )
nRow := Int( ( GetSysMetrics( 1 ) - nWAlto ) / 2 )
nAltFinal := (nWAlto-20) + nRow
nAncFinal := (nWAncho) + nCol
DEFINE DIALOG oWindow FROM nRow, nCol TO nAltFinal, nAncFinal ;
PIXEL TITLE "TDockPnel sobre dialogo" ;
COLOR CLR_WHITE, Rgb( 182, 182, 182 )
oDock1 := TDockPnel():New( oWindow )
WITH OBJECT oDock1
:SetHeightCaption( 30 )
:SetCoors( { | o | 10 }, ;
{ | o | 10 }, ;
{ | o | Int( o:oWnd:nHeight ) - 50 }, ;
{ | o | (Int( o:oWnd:nWidth / 12 )*8) - XEVal( o:nLeft, o ) } )
:SetCaption( { | o | "Título" } )
:SetColors( CLR_WHITE, CLR_RED , Rgb( 88, 88, 88 ), CLR_HGRAY )
:SetFont( oFont4 )
:lLeftImgs := .F.
:SetBorderSize( 4 )
:SetCtrlsPnel( { | o, nT, nL, nH, nW, oB | oB := ShowPageWeb( o, cUrl, nT, nL, nH, nW ) } )
:bRClicked := { || MsgInfo( oDock1:oWnd:aControls[ 1 ]:ClassName() ) }
:Activate()
END
oDock2 := TDockPnel():New( oWindow )
WITH OBJECT oDock2
:SetHeightCaption( 30 )
:SetCoors( { | o | XEval( o:oWnd:aControls[ 1 ]:nTop, o ) }, ;
{ | o | XEval( o:oWnd:aControls[ 1 ]:nRight, o ) + 10 }, ;
{ | o | XEval( o:oWnd:aControls[ 1 ]:nBottom, o ) - 1 }, ;
{ | o | (Int( o:oWnd:nWidth / 12 )*4) + XEval( o:nLeft, o ) - 25 } )
:SetCaption( { | o | "Información" } )
:SetColors( CLR_WHITE, Rgb( 0,120,215 ) , Rgb( 88, 88, 88 ), CLR_HGRAY )
:SetBorderSize( 4 )
:SetFont( oFont4 )
:lLeftImgs := .F.
:Activate()
END
ACTIVATE DIALOG oWindow