Daniel, this winwdow is possible to simulate with Tlayout ?
can you say how ?
#include "FiveWin.ch"
static ownd, owndlayout
/***************************************/
function Main()
/*
*/
local oGrupo, oBtn1, oRibbon
local oBtn2, oBtn3, oBtn4
SetBalloon( .T. )
DEFINE WINDOW oWnd FROM 1, 1 To 22, 75 ;
TITLE "This is a MDI enviroment" MDI ;
MENU BuildMenu()
DEFINE BUTTONBAR oBar OF oWnd SIZE 32, 32 2007
SET MESSAGE OF oWnd TO "A message bar"
ACTIVATE WINDOW oWnd maximized
return nil
function BuildMenu()
local oMenu
MENU oMenu 2007
MENUITEM "&DataBases"
MENU
MENUITEM "&Clients..." FILENAME "..\bitmaps\16x16\favorite.bmp" ACTION teste()
MENUITEM "&Report..."
MENU
MENUITEM "&One..." DISABLED
MENUITEM "&Two..." CHECKED
MENUITEM "&Three..." WHEN .F.
ENDMENU
SEPARATOR
MENUITEM "&End" ACTION oWnd:End()
ENDMENU
MENUITEM "Edit" WHEN .F.
oMenu:AddHelp()
MENUITEM "Another item"
ENDMENU
return oMenu
/*********************************************************/
function teste()
/*
*/
local oBrowse, oGet[2], cTest:=SPACE(10),cTest2:=space(10)
local hLays := {=>}
local hButtons := {=>}
local hBrowses := {=>}
local oFld
Local oFont := TFont():New( "Lucida Console", 0, -10,, )
Local oFonttxt := TFont():New( "Lucida Console", 0, -16,, )
Local oTitle
USE CUSTOMER NEW SHARED ALIAS "CUST1"
USE CUSTOMER NEW SHARED ALIAS "CUST2"
define window owndlayout mdichild of ownd title "testing layout"
hLays["MAIN"] := TLayout():new( owndlayout )
hLays["H1"] := hLays["MAIN"]:addVLayout(20)
hLays["H2"] := hLays["MAIN"]:addVLayout()
hLays["H4"] := hLays["MAIN"]:addVLayout(30)
hLays["H1"]:addHLayout(hLays["H2"]:nwidth)
* hLays["H1"]:aHLayout[1]:
oTitle := TTitle():New( 0, 0, hLays["H2"]:nwidth, 32, hLays["H1"]:aHLayout[1], "Clienti" )
oTitle:nClrText := CLR_WHITE
oTitle:nClrBar := RGB(89,135,214)
oTitle:nClrBar2 := RGB(3,56,147)
oTitle:lBorder := .t.
oTitle:nClrBorde := RGB(0,45,150)
hLays["H1"]:aHLayout[1]:oClient = oTitle
//folder
hLays["H2"]:addHLayout(900)
hLays["H2"]:addHLayout(380)
@ -50, 0 XBROWSE oBrowse of hLays["H2"]:aHLayout[1] ALIAS "CUST2"
oBrowse:CreateFromCode()
hLays["H2"]:aHLayout[1]:oClient := oBrowse
@ 0, 300 FOLDEREX oFld PIXEL PROMPT "Anagrafica", "Rapporti Commerciali", "Varie" of hLays["H2"]:aHLayout[2]
hLays["H2"]:aHLayout[2]:oClient = oFld
//--------------------------------------------------------------------------------------------------//
//botoes
oBar := TC5StBar():New(0,;
0,;
500,;
40,;
hLays["H4"],;
GetSysColor(15), GetSysColor(15) ,;
.T., ;
oFont,;
CLR_BLACK )
oBar:nClrBorder := RGB(124,124,148)
oBar:nClrOver := RGB(117,183,225) //RGB(255,255,220)
oBar:nClrOver2 := RGB(117,183,225) //RGB(238,152, 21)
oBar:nClrSel := CLR_WHITE //RGB(238,152, 21)
oBar:nClrSel2 := CLR_WHITE //RGB(250,227,144)
oBar:nClrPane := CLR_WHITE // RGB(255,255,255)
oBar:nClrPane2 := CLR_WHITE //RGB(143,172,230)
oBar:nClrTSel := RGB( 49,106,197)
oBar:AddItem( "Nuovo",".\bitmaps\manuale.bmp" , {||msginfo()}, {||.t.}, .f., "Nuova riga" )
oBar:AddItem( "Modifica",".\bitmaps\manuale.bmp" , {||msginfo()}, {||.t.}, .f., "Nuova riga" )
oBar:AddItem( "Elimina",".\bitmaps\manuale.bmp" , {||msginfo()}, {||.t.}, .f., "Nuova riga" )
oBar:AddItem( "Stampa",".\bitmaps\manuale.bmp" , {||msginfo()}, {||.t.}, .f., "Nuova riga" )
oBar:AddItem( "Etichette",".\bitmaps\manuale.bmp" , {||msginfo()}, {||.t.}, .f., "Nuova riga" )
for n := 1 to len( oBar:aItems )
oBar:aItems[n]:nFixHeight := 24
next
oBar:ResizeItems()
hLays["H4"]:oClient = oBar
//--------------------------------------------------------------------------------------------------//
activate window owndlayout maximized ;
ON RESIZE (oBrowse:nwidth:= owndlayout:nwidth/2+200,;
oFld:nLeft:= oBrowse:nLeft-300)
return ni
#include "FiveWin.ch"
static ownd, owndlayout
/***************************************/
function Main()
/*
*/
local oGrupo, oBtn1, oRibbon
local oBtn2, oBtn3, oBtn4
SetBalloon( .T. )
DEFINE WINDOW oWnd FROM 1, 1 To 22, 75 ;
TITLE "This is a MDI enviroment" MDI ;
MENU BuildMenu()
DEFINE BUTTONBAR oBar OF oWnd SIZE 32, 32 2007
SET MESSAGE OF oWnd TO "A message bar"
ACTIVATE WINDOW oWnd maximized
return nil
function BuildMenu()
local oMenu
MENU oMenu 2007
MENUITEM "&DataBases"
MENU
MENUITEM "&Clients..." FILENAME "..\bitmaps\16x16\favorite.bmp" ACTION teste()
MENUITEM "&Report..."
MENU
MENUITEM "&One..." DISABLED
MENUITEM "&Two..." CHECKED
MENUITEM "&Three..." WHEN .F.
ENDMENU
SEPARATOR
MENUITEM "&End" ACTION oWnd:End()
ENDMENU
MENUITEM "Edit" WHEN .F.
oMenu:AddHelp()
MENUITEM "Another item"
ENDMENU
return oMenu
/*********************************************************/
function teste()
/*
*/
local oBrowse, oGet[2], cTest:=SPACE(10),cTest2:=space(10)
local hLays := {=>}
local hButtons := {=>}
local hBrowses := {=>}
local oFld
Local oFont := TFont():New( "Lucida Console", 0, -10,, )
Local oFonttxt := TFont():New( "Lucida Console", 0, -16,, )
Local oTitle
USE CUSTOMER NEW SHARED ALIAS "CUST1"
USE CUSTOMER NEW SHARED ALIAS "CUST2"
define window owndlayout mdichild of ownd title "testing layout"
hLays["MAIN"] := TLayout():new( owndlayout )
hLays["H1"] := hLays["MAIN"]:addVLayout(20)
hLays["H2"] := hLays["MAIN"]:addVLayout()
hLays["H4"] := hLays["MAIN"]:addVLayout(30)
hLays["H1"]:addHLayout(hLays["H2"]:nwidth)
oTitle := TTitle():New( 0, 0, hLays["H2"]:nwidth, 32, hLays["H1"]:aHLayout[1], "Clienti" )
oTitle:nClrText := CLR_WHITE
oTitle:nClrBar := RGB(89,135,214)
oTitle:nClrBar2 := RGB(3,56,147)
oTitle:lBorder := .t.
oTitle:nClrBorde := RGB(0,45,150)
hLays["H1"]:aHLayout[1]:oClient = oTitle
//folder
hLays["H2"]:addHLayout()
hLays["H2"]:addHLayout()
@ -50, 0 XBROWSE oBrowse of hLays["H2"]:aHLayout[1] ALIAS "CUST2"
oBrowse:CreateFromCode()
hLays["H2"]:aHLayout[1]:oClient := oBrowse
@ 0, 300 FOLDEREX oFld PIXEL PROMPT "Anagrafica", "Rapporti Commerciali", "Varie" of hLays["H2"]:aHLayout[2]
hLays["H2"]:aHLayout[2]:oClient = oFld
//--------------------------------------------------------------------------------------------------//
//botoes
oBar := TC5StBar():New(0,;
0,;
500,;
40,;
hLays["H4"],;
GetSysColor(15), GetSysColor(15) ,;
.T., ;
oFont,;
CLR_BLACK )
oBar:nClrBorder := RGB(124,124,148)
oBar:nClrOver := RGB(117,183,225) //RGB(255,255,220)
oBar:nClrOver2 := RGB(117,183,225) //RGB(238,152, 21)
oBar:nClrSel := CLR_WHITE //RGB(238,152, 21)
oBar:nClrSel2 := CLR_WHITE //RGB(250,227,144)
oBar:nClrPane := CLR_WHITE // RGB(255,255,255)
oBar:nClrPane2 := CLR_WHITE //RGB(143,172,230)
oBar:nClrTSel := RGB( 49,106,197)
oBar:AddItem( "Nuovo",".\bitmaps\manuale.bmp" , {||msginfo()}, {||.t.}, .f., "Nuova riga" )
oBar:AddItem( "Modifica",".\bitmaps\manuale.bmp" , {||msginfo()}, {||.t.}, .f., "Nuova riga" )
oBar:AddItem( "Elimina",".\bitmaps\manuale.bmp" , {||msginfo()}, {||.t.}, .f., "Nuova riga" )
oBar:AddItem( "Stampa",".\bitmaps\manuale.bmp" , {||msginfo()}, {||.t.}, .f., "Nuova riga" )
oBar:AddItem( "Etichette",".\bitmaps\manuale.bmp" , {||msginfo()}, {||.t.}, .f., "Nuova riga" )
for n := 1 to len( oBar:aItems )
oBar:aItems[n]:nFixHeight := 24
next
oBar:ResizeItems()
hLays["H4"]:oClient = oBar
//--------------------------------------------------------------------------------------------------//
activate window owndlayout maximized;
ON RESIZE (hLays["H2"]:aHLayout[1]:= owndlayout:nwidth-80,;
hLays["H2"]:aHLayout[2]:= owndlayout:nwidth-400)
return ni
hLays["H2"]:aHLayout[1]:= owndlayout:nwidth-80
hLays["H2"]:aHLayout[2]:= owndlayout:nwidth-400
#include "fivewin.ch"
#include "ttitle.ch"
function main()
local oWnd
local oMainLay
local hLays := {=>}
local hButtons := {=>}
local hBrowses := {=>}
local oFld, oTitle2, oTitle1, oFont3
define window oWnd title "testing layout"
USE CUSTOMER NEW SHARED ALIAS "CUST1"
hLays["MAIN"] = TLayout():new( oWnd )
hLays["V1"] = hLays["MAIN"]:addVLayout(48) //Top with fixed size 48
hLays["V2"] = hLays["MAIN"]:addVLayout() //body
hLays["V3"] = hLays["MAIN"]:addVLayout(48) //bottom with fixed size 48
//BODY
hLays["V2"]:addHLayout() //left
hLays["V2"]:addHLayout(300) //right
@ 0,0 XBROWSE hBrowses["ONE"] OF hLays["V2"]:aHLayout[1] ALIAS "CUST1"
hBrowses["ONE"]:CreateFromCode()
hLays["V2"]:aHLayout[1]:oClient = hBrowses["ONE"]
@ 0, 0 FOLDEREX oFld PIXEL PROMPT "Gifs", "xbrowse", "layout" of hLays["V2"]:aHLayout[2]
hLays["V2"]:aHLayout[2]:oClient = oFld
@ 0, 0 TITLE oTitle1 size 10, 10 of hLays["V1"] SHADOW NOSHADOW
hLays["V1"]:oClient = oTitle1
@ 0, 0 TITLE oTitle2 size 10, 10 of hLays["V3"] SHADOW NOSHADOW
hLays["V3"]:oClient = oTitle2
activate window oWnd MAXIMIZED
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 80 guests