I wish create this window

it is a dialog on main window with ttitle on top , xbrowse at left a vertical splitter and a folder at right
on bottom a buttonbar
how i can make it ?
Inot wish use tlayout class but on a Windows and a tfsdi dialog
a tfsdi dialog is a dialog with the style nOR( WS_CHILD, 4 )
i made a test but not run ok there is someone can help me please . i insert the tfsdi class on bottom
// a Windows with a Dialog with ttitle xbrowse and buttonbar
#include "fivewin.ch"
聽REQUEST DBFCDX
聽REQUEST DBFFPT
static oWndMain,oBar,oBartitle
Static oDlgNew,oGrid,oPanelRight,oSplit
Static cIniFile
Function Main()
cIniFile 聽 聽:= cFilePath( GetModuleFileName( GetInstance() ) ) + "test.ini"
DEFINE WINDOW oWndMain Title "Test with ttitle and xbrowse,splitter,"
DEFINE BUTTONBAR oBar _3D SIZE 44, 46 OF oWndMain
SET MESSAGE OF oWndMain TO "fivewin power" CENTER NOINSET
oWndMain:bResized := {|| ResizeWndMain() }
聽ACTIVATE WINDOW oWndMain;
聽 聽 聽 on init test()
聽return nil
//--------------------------------------------------------------------------//
Function Test()
聽 聽Local oCol,i,aBrowse
聽 聽Local nSplit :=VAL(GetPvProfString("Browse", "CuSplit","302", cIniFile))
聽 聽oDlgNew := TFsdi():New(oWndMain)
聽 聽oWndMain:oClient := oDlgNew
聽 聽 oBarTitle:=TTitle():New( oDlgNew,0, 0,oDlgNew:nGridRight, 40)
USE CUSTOMER ALIAS CU
oDlgNew:NewGrid( nSplit )
oGrid:cAlias := "CU"
聽 聽aBrowse 聽 := { { { || CU->FIRST }, i18n("First"), 150, 0 },;
聽 聽 聽 聽 聽 聽 聽 聽 聽 { { || CU->LAST 聽}, i18n("Last"), 150, 0 },;
聽 聽 聽 聽 聽 聽 聽 聽 聽 { { || CU->STREET}, i18n("Street"), 150, 0 },;
聽 聽 聽 聽 聽 聽 聽 聽 聽 { { || CU->CITY } , i18n("City"), 150, 0 } }
聽 聽FOR i := 1 TO Len(aBrowse)
聽 聽 聽 oCol := oGrid:AddCol()
聽 聽 聽 oCol:bStrData := aBrowse[ i, 1 ]
聽 聽 聽 oCol:cHeader 聽:= aBrowse[ i, 2 ]
聽 聽 聽 oCol:nWidth 聽 := aBrowse[ i, 3 ]
聽 聽 聽 oCol:nDataStrAlign := aBrowse[ i, 4 ]
聽 聽 聽 oCol:nHeadStrAlign := aBrowse[ i, 4 ]
聽 聽NEXT
聽 聽oGrid:CreateFromCode()
聽 聽 //---------------------------------------------------------------------------//
聽 聽oPanelRight:=TPanel():New(oBarTitle:nBottom+1,nSplit+2,;
聽 聽 聽 聽 聽 聽 聽 聽oDlgNew:nGridRight,;
聽 聽 聽 聽 聽 聽 聽 聽oDlgNew:nGridBottom-26,;
聽 聽 聽 聽 聽 聽 聽 聽oDlgNew)
聽 聽 //---------------------------------------------------------------------------//
聽 聽 聽 聽oSplit := TSplitter():New(oBarTitle:nBottom+1,nSplit,(.not..F.) .or. .T.,{oGrid},.not..F.,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 {oPanelRight},.not..F.,,,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oDlgNew,,1,oDlgNew:nGridBottom ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 .T.,.T.,,.F.,.T.,.T. )
聽 聽 聽 聽ACTIVATE DIALOG oDlgNew NOWAIT ;
聽 聽 聽 聽 聽 聽ON PAINT (oSplit:AdjClient()) ;
聽 聽 聽 聽 聽 聽ON INIT ( Load_dialog(),oGrid:SetFocus(),ResizeWndMain()) ;
聽 聽 聽 聽 聽 聽 VALID ( oGrid:nLen := 0 ,;
聽 聽 聽 聽 聽 聽 聽 聽 DbCloseAll(), oDlgNew := NIL, .t. )
聽 聽 聽 聽return nil
Function Load_dialog()
聽 聽 聽Local oFld
聽 聽 聽 @ 30,0 聽FOLDER oFld 聽ITEMS 聽"Anagrafica","Rapporti Commerciali","Varie";
聽 聽 聽 SIZE oPanelRight:nRight,oPanelRight:nBottom-26 PIXEL;
聽 聽 聽 OF oPanelRight ;
聽 聽 聽 OPTION 1
聽 聽oPanelRight:oClient:= 聽oFld
聽 聽return nil
//---------------------------------------------------------------------------//
Function ResizeWndMain()
聽 聽local aClient
聽 聽 IF oDlgNew != NIL
聽 聽 聽 聽aClient := GetClientRect ( oWndMain:hWnd )
聽 聽 聽 聽 聽oDlgNew:SetSize( aClient[4], aClient[3] - oBar:nHeight - oWndMain:oMsgBar:nHeight+1 - oBartitle:nBottom)
聽 聽 聽 聽 聽 IF 聽oSplit 聽!= NIL
聽 聽 聽 聽 聽 聽 聽 聽oSplit:Refresh()
聽 聽 聽 ENDIF
聽 聽 聽 聽 聽IF oBarTitle != nil
聽 聽 聽 聽 聽 聽 oBarTitle:SetSize(aClient[ 2 ],40)
聽 聽 聽 聽 聽 聽 oBarTitle:Refresh()
聽 聽 聽 聽 聽ENDIF
聽 聽 聽IF oGrid 聽!= NIL
聽 聽 聽 聽 聽oGrid:SetSize( aClient[ 3 ]- oGrid:nLeft, oDlgNew:nHeight -oBartitle:nBottom)
聽 聽 聽 聽 聽oGrid:Refresh()
聽 聽 聽 聽ENDIF
聽 聽 聽 聽if oPanelRight != nil
聽 聽 聽 聽 oPanelRight:SetSize( aClient[ 4 ]- oPanelRight:nLEFT,oDlgNew:nHeight- oBartitle:nBottom)
聽 聽 聽 聽 oPanelRight:Refresh()
聽 聽 聽endif
聽 聽 聽oWndMain:oMsgBar:Refresh()
聽 聽 聽 聽 聽SysRefresh()
聽 聽ENDIF
聽return nil
//-----------------------------------------------------------------------------//
CLASS TFsdi FROM TDialog
聽 聽DATA nGridBottom, nGridRight
聽 聽CLASSDATA lRegistered AS LOGICAL
聽 聽METHOD New( oWnd, lPixels ) CONSTRUCTOR
聽 聽METHOD AdjClient() // INLINE oApp():AdjClient()
聽 聽METHOD NewGrid( nSplit )
ENDCLASS
METHOD New( oWnd ) CLASS TFsdi
聽 聽local 聽 aClient
聽 聽default oWnd 聽 聽:= oWndMain // GetWndDefault()
聽 聽aClient := GetClientRect (oWnd:hWnd )
聽 聽::oWnd = oWnd
聽 聽::nTop 聽 聽= oBar:nHeight
聽 聽::nLeft 聽 = 0
聽 聽::nBottom = aClient[3] - 1
聽 聽::nRight 聽= aClient[4]
聽 聽::nStyle 聽:= nOR( WS_CHILD, 4 )
聽 聽::lHelpIcon 聽 聽:= .f.
聽 聽::lTransparent := .f.
聽 聽DEFINE FONT ::oFont NAME 'Tahoma' SIZE 0, -12
聽 聽::nGridBottom 聽:= (::nBottom / 2) - oBar:nHeight
聽 聽::nGridRight 聽 := (::nRight / 2 )
聽 聽::aControls 聽 聽:= {}
聽 聽::SetColor( CLR_WHITE, GetSysColor(15) )
聽 聽::Register( nOr( CS_VREDRAW, CS_HREDRAW ) )
聽 聽 聽SetWndDefault( Self )
聽 聽 聽return Self
聽 METHOD NewGrid( nSplit ) CLASS TFsdi
聽 聽oGrid := TXBrowse():New( oDlgNew )
聽 聽oGrid:nTop 聽 聽:= oBarTitle:nBottom
聽 聽oGrid:nLeft 聽 := 00
聽 聽oGrid:nBottom := oDlgNew:nGridBottom
聽 聽oGrid:nRight 聽:= oDlgNew:nGridRight
return nil
METHOD AdjClient() CLASS TFsdi
聽 聽return nilI use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com





