karinha wrote:También és una alternativa, FiveUi:
http://wiki.fivetechsoft.com/doku.php?id=fiveui_soporte
Saludos.
cnavarro wrote:karinha wrote:También és una alternativa, FiveUi:
http://wiki.fivetechsoft.com/doku.php?id=fiveui_soporte
Saludos.
Por supuesto, qué voy a decir yo?
cnavarro wrote:No me has dicho el error que te da
En cuanto a lo que comentas
Por supuesto, es una posibilidad.
WITH OBJECT ( oPnel2 := TPanel():New( 0, 0, 0, nWPanel, oExplBar ) )
:SetColor( 0, METRO_OLIVE )
:SetBrush( oBrush )
// :nAlign := 3 // NO ACCEPTA Porque master Navarro?
WndHeight( :hWnd, :nHeight + 2 )
:bPainted := { | o | HazSayPnel() }
:bLDblClick := { | o | lHide := !lHide, ;
oVSplitL:SetPosition( if( !lHide, nWPanel + 1, nPosVSp ) ), ;
Eval( oVSplitL:bChange ), ;
oVSplitL:Adjust(), oWndCalend:Refresh() }
END WITH
//----------------------------------------------------------------------------//
//
// Test implementation MDI enviroment
// Author: Cristobal Navarro
// Date: 28/12/2017 Modificado en: 07/12/2018 - Joao.
//
//----------------------------------------------------------------------------//
#include "FiveWin.ch"
#include "splitter.ch"
Static oWndP
Static oWnd
Static oWndCalend
Static oBarMdi
Static oFont
Static oFont1
Static oFont2
Static oExplBar
Static oVSplitL
Static oTitle
Static oPnel2
Static nRow := 0
Static nCol := 0
Static nHChild := 250
Static nWChild := 400
Static nPosL := 0
Static nPosVSp := 360 //331
Static nHSay := 19
Static nWPanel := 32
Static cTitPnel := "TITULO PANEL ( Press Double Click )"
Static cTitWnd := "TITULO VENTANA"
Static lAdjChild := .F.
//----------------------------------------------------------------------------//
Function Main()
local oMenu
DEFINE FONT oFont NAME "Calibri" SIZE 0, -14 //BOLD
DEFINE FONT oFont1 NAME "Calibri" SIZE 0, -12 BOLD
DEFINE FONT oFont2 NAME "Calibri" SIZE 0, -20 NESCAPEMENT 900 BOLD
DEFINE WINDOW oWnd STYLE WS_POPUP COLORS 0, CLR_HGRAY
@ 2, 1 SAY oTitle PROMPT cTitWnd OF oWnd ;
SIZE nPosVSp + 11, nHSay PIXEL FONT oFont CENTER COLOR CLR_BROWN, CLR_WHITE
DEFINE MSGBAR OF oWnd PROMPT "Sample MDI"
//oWnd:oLeft := oExplBar
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT ( HazExplorerBar(), HazSplit(), ;
HazMdi(), nPosL := oWndCalend:nLeft ) ;
VALID ( SendMessage( oWndCalend:hWnd, WM_CLOSE ), .T. )
RELEASE FONT oFont
RELEASE FONT oFont1
RELEASE FONT oFont2
return nil
//----------------------------------------------------------------------------//
Function HazSplit()
local oBrush
DEFINE BRUSH oBrush FILE "..\bitmaps\spiral.bmp"
@ 24, nPosVSp SPLITTER oVSplitL ;
VERTICAL ;
PREVIOUS CONTROLS oTitle, oExplBar ; // HINDS CONTROLS oWndCalend ;
LEFT MARGIN 2 ;
RIGHT MARGIN 2 ;
SIZE 12, ScreenHeight() - 1 - 23;
COLOR CLR_GRAY PIXEL ;
OF oWnd ;
ON CHANGE ( oWndCalend:SetSize( oWndCalend:nWidth + ( nPosL - ( oVSplitL:nRight + 2 ) ), ;
oWnd:nHeight - 26 ), ;
oWndCalend:Move( 3, oVSplitL:nRight + 2 ), ;
AEVal( oWndCalend:oWndClient:aWnd, ;
{ | w | w:Move( w:nTop, w:nLeft ), ;
w:SetSize( w:nWidth, w:nHeight ) } ), ;
nPosL := oVSPlitL:nRight + 2 )
//Para ajustar proporcionalmente el ancho de las childs al mover el splitter
//w:SetSize( w:nWidth + ( nPosL - ( oVSplitL:nRight + 2 ) ), w:nHeight ) } ), ;
oVSplitL:SetBrush( oBrush )
RELEASE BRUSH oBrush
Return nil
//----------------------------------------------------------------------------//
Function HazExplorerBar()
local aPnels := {}
local lHide := .T.
local oSay
local bClick := { | o | MsgInfo( o:GetText() ) }
Local aGrad := { { CLR_WHITE, METRO_OLIVE },;
{ CLR_WHITE, METRO_OLIVE } }
local oBrush, nPanel, nItem // warnings
Local aGrad1 := { { 0.5, METRO_OLIVE, CLR_HGRAY },;
{ 0.5, CLR_HGRAY, METRO_OLIVE } }
DEFINE BRUSH oBrush GRADIENT aGrad1
oExplBar := TExplorerBar():New( nHSay + 3, 1, nPosVSp - 1, oWnd:nHeight() - 2, oWnd, , , , , , , )
oExplBar:nTopColor := Rgb( 240, 240, 240 )
oExplBar:nBottomColor := aGrad[ 1 ][ 2 ]
AAdd( aPnels, oExplBar:AddPanel( "DATABASES", "D:\Fwh\FwhTeam\BmpsVS_32\CrashDumpFile_32x_24.Bmp", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
WITH OBJECT Atail( aPnels ) //oPanel1
//:nOffSetX := 100
:nClrTextSpecial := CLR_WHITE
:nClrHover := Rgb( 0, 0, 0 ) //RGB( 66, 142, 255 )
:nOffSetY := 12
:LoadBitmaps( 1, "D:\Fwh\FwhTeam\BmpsVS_32\CheckOut_16x_32.bmp" )
:LoadBitmaps( 2, "D:\Fwh\FwhTeam\BmpsVS_32\CheckIn_16x_32.bmp" )
:nTopMargin := 1
:nLeftMargin := nWPanel + 22
:nRightMargin := 10
:nLeft := aPnels[ 1 ]:nLeftMargin
:nRight := oWnd:nWidth - aPnels[ 1 ]:nRightMargin
:AddLink( "Open", bClick, "D:\Fwh\FwhTeam\BmpsVS_32\DatabaseRun_16x_32.bmp", , METRO_OLIVE, , )
:AddLink( "Explorer", bClick, "D:\Fwh\FwhTeam\BmpsVS_32\DatabaseAuditSpecification_16x_32.bmp", , METRO_OLIVE, , )
:AddLink( "Structure", bClick, "D:\Fwh\FwhTeam\BmpsVS_32\Databar_16x_32.Bmp", , METRO_OLIVE, , )
:AddLink( "Tools", bClick, "D:\Fwh\FwhTeam\BmpsVS_32\DatabaseOptions_12882_32.bmp", , METRO_OLIVE, , )
:AddLink( "Close", bClick, "D:\Fwh\FwhTeam\BmpsVS_32\DatabaseOffline_16x_32.bmp", , METRO_OLIVE, , )
END
WITH OBJECT oExplBar
AAdd( aPnels, :AddPanel( "TOOLS", "D:\Fwh\FwhTeam\BmpsVS_32\DataMiningStructure_32x_24.bmp", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
AAdd( aPnels, :AddPanel( "EDITOR", "D:\Fwh\FwhTeam\BmpsVS_32\FrameworkDesignStudio_32x_24.bmp", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
AAdd( aPnels, :AddPanel( "EXPLORER", "D:\Fwh\FwhTeam\BmpsVS_32\FileDialogReport_32x_24.bmp", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
AAdd( aPnels, :AddPanel( "EXP./IMPORT", "D:\Fwh\FwhTeam\BmpsVS_32\GetTextFormat_32x_24.Bmp", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
AAdd( aPnels, :AddPanel( "USERS", "D:\Fwh\FwhTeam\BmpsVS_32\LookupPrincipal_32x_24.bmp", , 40, 0, aGrad, oFont, CLR_WHITE, CLR_WHITE ) )
For nPanel := 2 to Len( aPnels )
WITH OBJECT :aPanels[ nPanel ]
//:lSpecial := .T.
//:nOffSetX := 60
:lCollapsed := .T.
:LoadBitmaps( 1, "D:\Fwh\FwhTeam\BmpsVS_32\CheckOut_16x_32.bmp" )
:LoadBitmaps( 2, "D:\Fwh\FwhTeam\BmpsVS_32\CheckIn_16x_32.bmp" )
:nClrTextSpecial := CLR_WHITE
:nClrHover := Rgb( 0, 0, 0 )
:nTopMargin := 1
:nLeftMargin := nWPanel + 22
:nRightMargin := 10
:nLeft := :nLeftMargin
:nRight := oWnd:nWidth - :nRightMargin
:nHeight := :nTitleHeight
END
For nItem := nPanel + 1 To Len( :aPanels )
:aPanels[ nItem ]:nTop -= ( :aPanels[ nPanel ]:nBodyHeight )
Next
Next
:CheckScroll()
END WITH
WITH OBJECT ( oPnel2 := TPanel():New( 0, 0, 0, nWPanel, oExplBar ) )
:SetColor( 0, METRO_OLIVE )
:SetBrush( oBrush )
// :nAlign := 3 // No funciona
:nHeight := oWnd:nHeight() // ESTO AGREGUE YO marcelo Roggeri
WndHeight( :hWnd, :nHeight + 2 )
:bPainted := { | o | HazSayPnel() }
:bLDblClick := { | o | lHide := !lHide, ;
oVSplitL:SetPosition( if( !lHide, nWPanel + 1, nPosVSp ) ), ;
Eval( oVSplitL:bChange ), ;
oVSplitL:Adjust(), oWndCalend:Refresh() }
END WITH
RELEASE BRUSH oBrush
Return nil
//----------------------------------------------------------------------------//
Function HazMdi()
local oBrush
Local aGrad := { { 0.5, CLR_WHITE, METRO_OLIVE },;
{ 0.5, METRO_OLIVE, CLR_WHITE } }
DEFINE BRUSH oBrush GRADIENT aGrad
DEFINE WINDOW oWndCalend MDI OF oWnd STYLE WS_POPUP ;
FROM 3, oVSplitL:nRight TO oWnd:nHeight - 26, oWnd:nWidth - 4 ;
PIXEL COLOR CLR_BLUE, CLR_HGRAY MENU MyMenu() //BRUSH oBrush
ACTIVATE WINDOW oWndCalend ;
ON INIT HazBar() ;
ON RESIZE ( oWndCalend:SetMenu( oWndCalend:oMenu ) ) //, ;
Return nil
//----------------------------------------------------------------------------//
Function HazBar()
DEFINE BUTTONBAR oBarMdi OF oWndCalend SIZE 64, 64 2015 NOBORDER HEIGHT 88
DEFINE BUTTON OF oBarMdi PROMPT "Create" ;
FILE "D:\Fwh\FwhTeam\BmpsVS_32\CPPHubApplication_32x_24.bmp" ;
ACTION ( WindowChild() ) ;
GROUP LABEL "Child" COLORS CLR_WHITE, METRO_OLIVE
DEFINE BUTTON OF oBarMdi ;
FILE "D:\Fwh\FwhTeam\BmpsVS_32\Uninstall_32x_24.bmp" ;
ACTION ( MsgInfo( oWndCalend:oWndClient:nLeft ) ) ;
GROUP LABEL "Others Actions" COLORS CLR_WHITE, METRO_OLIVE
DEFINE BUTTON OF oBarMdi ;
FILE "D:\Fwh\FwhTeam\BmpsVS_32\UMLModelFile_32x_24.bmp" ;
ACTION ( MsgInfo( oWndCalend:ClassName() ) )
DEFINE BUTTON OF oBarMdi ;
FILE "D:\Fwh\FwhTeam\BmpsVS_32\TestSuiteStatic_32x_24.bmp" ;
ACTION ( MsgInfo( oWndCalend:oWndActive:ClassName() ) )
DEFINE BUTTON OF oBarMdi ;
FILE "D:\Fwh\FwhTeam\BmpsVS_32\SourceControlSites_32x_24.bmp" ;
ACTION ( MsgInfo( Len( oWndCalend:oWndClient:aWnd ) ) )
DEFINE BUTTON OF oBarMdi PROMPT "Exit" ;
FILE "D:\Fwh\FwhTeam\BmpsVS_32\MappedTracepointDisable_32x_24.bmp" ;
ACTION ( oWnd:End() ) ;
GROUP LABEL "Salir" COLORS CLR_WHITE, METRO_OLIVE
Return oBarMdi
//----------------------------------------------------------------------------//
Function MyMenu()
local oMenu
MENU oMenu FONT oFont 2015 ;
COLORMENU CLR_WHITE, CLR_BROWN
MENUITEM "Option &1" FILE "D:\Fwh\FwhTeam\BmpsVS_32\PreviousBookmarkFolder_16x_32.bmp"
MENU
MENUITEM "Item 11" FILE "D:\Fwh\FwhTeam\BmpsVS_32\SQLLibrary_16x_32.bmp"
SEPARATOR
MENUITEM "Item 12" FILE "D:\Fwh\FwhTeam\BmpsVS_32\SlicersHorizontal_16x_32.bmp"
MENUITEM "Item 13" FILE "D:\Fwh\FwhTeam\BmpsVS_32\SlicersVertical_16x_32.bmp"
ENDMENU
MENUITEM "Option &2" FILE "D:\Fwh\FwhTeam\BmpsVS_32\PhoneNumberViewer_16x_32.bmp"
MENU
MENUITEM "Item 21" FILE "D:\Fwh\FwhTeam\BmpsVS_32\RunTests_8790_32.bmp"
MENUITEM "Item 22" FILE "D:\Fwh\FwhTeam\BmpsVS_32\ResultstoText_9948_32.bmp"
SEPARATOR
MENUITEM "Item 23" FILE "D:\Fwh\FwhTeam\BmpsVS_32\ReformatSelection_16x_32.bmp"
MENUITEM "Item 24" FILE "D:\Fwh\FwhTeam\BmpsVS_32\PYWeb_16x_32.bmp"
ENDMENU
//MENUITEM "&Exit" ACTION oWnd:End()
oMenu:AddMdi( , "D:\Fwh\FwhTeam\BmpsVS_32\FolderBrowserDialogControl_678_32.bmp")
oMenu:AddHelp("Test Fivewin MDI Enviroment", "Cristobal Navarro - 2017", , ;
"D:\Fwh\FwhTeam\BmpsVS_32\HelpApplication_16x_32.bmp", , .F. )
ENDMENU
Return oMenu
//----------------------------------------------------------------------------//
function WindowChild()
local oWndChild
local oFolder, oSay, oSay1
local x
local nPosR := 0
local nPosC := 0
if Len( oWndCalend:oWndClient:aWnd ) > 0
if ( nRow + nHChild ) > oWndCalend:nHeight
nRow := 0
if ( nCol + Int( nWChild / 2 ) ) > oWndCalend:nWidth
nCol := 0
else
nCol += Int( nWChild / 2 )
endif
else
nRow += Int( nHChild / 4 )
endif
endif
DEFINE WINDOW oWndChild MDICHILD OF oWndCalend ;
FROM nRow + 1 , nCol TO nHChild, nWChild PIXEL //NOSYSMENU //BRUSH oWndCalend:oBrush // NOCAPTION
//@ 0, 0 FOLDER oFolder OF oWndChild
//oWndChild:oClient := oFolder
ACTIVATE WINDOW oWndChild ;
ON INIT oWndChild:cToolTip := oWndChild:cCaption ;
ON MOVE ( oWndChild:CoorsUpdate(), ;
if( oWndChild:nLeft < 1, oWndChild:Move( oWndChild:nTop, 0 ), ), ;
if( oWndChild:nTop < 2, oWndChild:Move( 1, oWndChild:nLeft ), ) )
return oWndChild
//----------------------------------------------------------------------------//
Function HazSayPnel()
oPnel2:Say( Int( oPnel2:nHeight / 2 ) - Int( Len( cTitPnel ) ), 1, ;
cTitPnel, CLR_WHITE, , oFont2, .T., .T. )
Return nil
//----------------------------------------------------------------------------//
Static nPosVSp := 360 * 0.75
//:nAdjust := 3
// Prueba asi
::nAdjust( 3 )
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 45 guests