there is a owndMain, at left Explorer bar at right a system where the user can show many folders as childwnd and on each folder can show any solution as xbrowse, chart, rpreview or dialog for inser/modif
sometimes a folder can have horizontal splitter and have another xbrowse on bottom
each folder can be close from label ( see the red x on label)
how create it ?
I made a test but it make a adjclient error on resize
- Code: Select all Expand view
#include "FiveWin.ch"
static oWnd,oBar,oExit
static oMsgItem3,oMsgItem2,cMsgBar
static FEATURES_YEAR
static oDlgFatturas
//----------------------------------------------------------------------------//
function Main()
local oWnd
cMsgBar:= "test"
FEATURES_YEAR:= "2015"
DEFINE WINDOW oWnd TITLE "Test" ;
MENU BuildMenu() ;
COLOR CLR_BLACK, GetSysColor( 15 ) - Rgb( 30, 30, 30 )
SET MESSAGE OF oWnd TO cMsgBar CENTER NOINSET 2015
DEFINE MSGITEM oMsgItem2;
OF oWnd:oMsgBar ;
PROMPT cMsgBar ;
SIZE 100 ;
BITMAPS "MSG_LOTUS", "MSG_LOTUS";
TOOLTIP " " + i18n("Acerca de...") + " ";
ACTION MsgInfo( "Test de Full Single Document Interface" )
DEFINE MSGITEM oMsgItem3 OF oWnd:oMsgBar ;
SIZE 132 ;
TOOLTIP i18n( "Visitar la web de alanit en internet" ) ;
PROMPT "www.alanit.com" ;
COLOR CLR_HBLUE, GetSysColor(15) ;
ACTION NIL
oWnd:oMsgBar:DateOn()
BuildBtnBar(oWnd)
ACTIVATE WINDOW oWnd ;
on resize ResizeWndMain(oWnd)
return nil
//----------------------------------------------------------------------------//
Function BuildBtnBar(oWnd)
local oBtnTbl
DEFINE BUTTONBAR oBar _3D SIZE 44, 46 OF oWnd 2015
oBar:bRClicked := { || .t. }
DEFINE BUTTON OF oBar ;
RESOURCE "BB1" ;
TOOLTIP i18n( "Gestión de documentos" ) ;
MESSAGE i18n( "Gestión de del fichero de documentos." ) ;
ACTION test(oWnd) ;
NOBORDER
RETURN nil
//----------------------------------------------------------------------------//
Function BuildMenu()
local oMenu
MENU oMenu FEATURES_YEAR //2015 try with 2015 or nothing...
MENUITEM "&Archivo"
MENU
MENUITEM i18n( "Especificar impresora" ) ;
RESOURCE "PRINTER" ; // ON WINDOWS SEVEN IF NOT FOUND RESOURCEs IT INSERT BLACK LINES
ACTION PrinterSetup() ;
MESSAGE i18n( " Establecer la Configuración de su impresora. " )
SEPARATOR
MENUITEM i18n( "Salir" ) ;
ACTION oWnd:end() ;
MESSAGE i18n( " Terminar la ejecución del programa. " )
ENDMENU
ENDMENU
RETURN oMenu
//----------------------------------------------------------------------------//
Function Test(oWnd)
local oPanel1
Local nSplit := 400
LOcal aClient := GetClientRect (oWnd:hWnd )
DEFINE DIALOG oDlgFatturas
oDlgFatturas:nTop = oBar:nHeight + 4
oDlgFatturas:nLeft = 0
oDlgFatturas:nBottom = aClient[3] - 1
oDlgFatturas:nRight = aClient[4]
oDlgFatturas:nStyle := nOR( WS_CHILD, 4 )
oWnd:oClient := oDlgFatturas
ACTIVATE DIALOG oDlgFatturas NOWAIT ;
on init ( Explorerbar (oDlgFatturas,nSplit),;
Folder(oDlgFatturas,nSplit))
//----------------------------------------------------------------------------------------//
Function Explorerbar(oDlgFatturas,nSplit)
oExBar = TExplorerBar():New( 0, 0, nSplit, oDlgFatturas:nBottom, oDlgFatturas )
oPanel1 := oExBar:AddPanel( "Uno" )
oPanel1:lSpecial = .T.
oPanel1:AddLink( "enero" )
return nil
//----------------------------------------------------------------------------------------//
Function Folder(oDlgFatturas,nSplit)
Local aPrompts:= { "&Fatturas" }
oFold :=Tfolder():New( 0, nSplit+5,aPrompts , , oDlgFatturas, , ,;
, .t., , oDlgFatturas:nWidth, oDlgFatturas:nBottom )
return nil
//----------------------------------------------------------------------------------------//
Function ResizeWndMain(oWnd)
local aClient
aClient := GetClientRect ( oWnd:hWnd )
IF oDlgFatturas != NIL
oDlgFatturas:SetSize( aClient[4], aClient[3] - oBar:nHeight - oWnd:oMsgBar:nHeight+1 )
oWnd:oMsgBar:Refresh()
SysRefresh()
ENDIF
return NIL