Leandro, no es un problema de TDockPnel, lo mismo ocurre si lo envías sobre una TWindow
Para que te aparezca correctamente, el contenedor ha de estar maximizado
Code: Select all
//----------------------------------------------------------------------------//
// ( C ) Cristobal Navarro - 2021
// TDockPnel with ActiveX
//----------------------------------------------------------------------------//
#include "Fivewin.ch"
#include "colores.ch"
//----------------------------------------------------------------------------//
//
//----------------------------------------------------------------------------//
Static oWindow
Static nWAncho
Static nWAlto
Static nCol
Static nRow
Static oFont4
Static cPathApp
Static oDock1
Static oDock2
Static oDock3
Static oDock4
Static oDock5
Static cText := ""
//----------------------------------------------------------------------------//
//
//----------------------------------------------------------------------------//
Function Main()
local cFont := "Segoe UI Symbol" //TAHOMA //CALIBRI
DEFINE FONT oFont4 NAME "CALIBRI" SIZE 0,-16
TestDockPnel()
oFont4:End()
Return nil
//----------------------------------------------------------------------------//
//
//----------------------------------------------------------------------------//
Static Function TestDockPnel()
local nCol
local nRow
nWAncho := Int( GetSysMetrics( 0 ) * 0.95 )
nWAlto := Int( GetSysMetrics( 1 ) * 0.95 )
nCol := Int( ( GetSysMetrics( 0 ) - nWAncho ) / 2 )
nRow := Int( ( GetSysMetrics( 1 ) - nWAlto ) / 2 )
DEFINE WINDOW oWindow FROM nRow, nCol TO nWAlto + nRow, nWAncho + nCol ; //MDI ;
PIXEL TITLE "Test TDockPnel Control ActiveX - " + FWVERSION ;
COLOR CLR_WHITE, Rgb( 182, 182, 182 )
ACTIVATE WINDOW oWindow MAXIMIZED ON INIT CreaDocks()
Return nil
//----------------------------------------------------------------------------//
//
//----------------------------------------------------------------------------//
Function CreaDocks()
local cUrl := "www.google.es"
oDock1 := TDockPnel():New( oWindow )
WITH OBJECT oDock1
:SetHeightCaption( 24 )
:SetCoors( { | o | 2 }, { | o | 2 }, ;
{ | o | o:oWnd:nHeight - 42 }, ;
{ | o | o:oWnd:nWidth - 20 } )
:SetCaption( { | o | cUrl } )
:SetColors( CLR_WHITE, METRO_RED, Rgb( 88, 88, 88 ), CLR_WHITE )
:SetFont( oFont4 )
:SetBorderSize( 1 )
:SetImgsFiles( { { "..\bitmaps\16x16\options.bmp", { | o | MyPopupMnu( o ) }, "ToolTip" } } )
:SetCtrlsPnel( { | o, nT, nL, nH, nW, oB | oB := ShowPageWeb( o, cUrl, nT, nL, nH, nW ) } )//, ;
// SetParent( oB:hWnd, o:hWnd ) } )
:Activate()
END
Return nil
//----------------------------------------------------------------------------//
//
//----------------------------------------------------------------------------//
Function MyPopupMnu( o )
local oMnu
local nRow := o:nTop + Int( o:nHeight / 2 )
local nCol := o:nLeft + Int( o:nWidth / 2 )
MENU oMnu POPUP 2013 ;
COLORSELECT METRO_STEEL, METRO_STEEL, CLR_WHITE ;
COLORMENU CLR_WHITE, CLR_BLUE ;
COLORSEPARATOR METRO_STEEL ;
COLORLEFT CLR_WHITE ;
FONT oFont4
MENUITEM "Info" ACTION MsgInfo( "Class TDockPnel" )
SEPARATOR
MENUITEM "Exit" ACTION oWindow:End()
ENDMENU
ACTIVATE MENU oMnu AT nRow, nCol OF o:oWnd
Return oMnu
//----------------------------------------------------------------------------//
//
//----------------------------------------------------------------------------//
Function ShowPageWeb( oParent, cUrl, nT, nL, nH, nW )
local oActX
//oActX := CreateObject( "InternetExplorer.Application", "IE_" )
oActX := CreateObject( "{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}", "IE_" )
WITH OBJECT oActX
:Visible := .t.
:ToolBar := .f.
:StatusBar := .f.
:MenuBar := .f.
:FullScreen := .T.
:Invoke( "Navigate", cURL )
END
SetParent( oActX:hWnd, oParent:hWnd )
Return oActX
//----------------------------------------------------------------------------//
//
//----------------------------------------------------------------------------//
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.