FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Test Windows Mdi with panel right
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Test Windows Mdi with panel right
Posted: Mon Apr 25, 2022 10:26 AM


I would like to have a window in MDI mode with a panel on the right where to place objects such as an xbrowse and the final user can make this panel smaller with a click, and when the panel is closed it must hide to the right
I saw this on a software made in vb, I would like to create it on fwh


test of image
Code (fw): Select all Collapse
#include "fivewin.ch"



//----------------------------------------------------------------------------//

聽 聽 function Main()

聽 聽 聽 聽local oWnd, oBarRight, oBar

聽 聽 聽 聽SetGetColorFocus()

聽 聽 聽 聽DEFINE WINDOW oWnd MDI TITLE "test panel on dx" 聽HSCROLL VSCROLL
聽 聽 聽 聽DEFINE BUTTONBAR oBarRight OF oWnd SIZE 200,32 2007 RIGHT
聽 聽 聽 聽DEFINE BUTTONBAR oBar OF oWnd SIZE 100,32 2007
聽 聽 聽 
聽 聽 聽 聽ACTIVATE WINDOW oWnd ;
聽 聽 聽 聽ON INIT TESTBROWSE(oBarRight)

聽 聽 return nil

聽 聽 //----------------------------------------------------------------------------//

聽 聽 聽FUNCTION TESTBROWSE(oBarRight)
聽 聽 聽 聽LOCAL oBrw
聽 聽 聽 聽local adata:= {;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽{"Bari",55,66,99,88,77},;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽{"Pescara",55,66,99,88,77},;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽{"Ancona",55,66,99,88,77},;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽}
聽 聽 聽 聽 @ 2,1 XBROWSE oBrw OF oBarRight SIZE 200,oBarRight:nWidth-10 PIXEL NOBORDER;
聽 聽 聽 COLS 1,2,3,4,5,6;
聽 聽 聽 HEADERS "Ruota", "E1", "E2", "E3", "E4", "E5" ;
聽 聽 聽 SIZES 聽30,35,35,35,35,35 聽;
聽 聽 聽 ARRAY adata ;
聽 聽 聽 CELL LINES

聽 聽 聽 聽 WITH OBJECT oBrw
聽 聽 聽 :nRowHeight 聽 聽:= 19
聽 聽 聽 :nClrBorder := CLR_GRAY
聽 聽 聽 :lDrawBorder := .t.
聽 聽 聽 :nColorBox := CLR_HRED
聽 聽 聽 :nMarqueeStyle 聽 聽 聽 := MARQSTYLE_HIGHLWIN7
聽 聽 聽 *:lHeader 聽 聽 聽 聽 聽 聽 := .f.
聽 聽 聽 :lHscroll 聽 聽 聽 聽 聽 聽:= .f.
聽 聽 聽 :lvscroll 聽 聽 聽 聽 聽 聽:= .f.
聽 聽 聽 :l2007 聽 聽 聽 聽 聽 聽 聽 := .F.
聽 聽 聽 :l2015 聽 聽 聽 聽 聽 聽 聽 := .f.
聽 聽 聽 :nStretchCol 聽 聽 聽 聽 := STRETCHCOL_WIDEST
聽 聽 聽 :lAllowRowSizing 聽 聽 := .F.
聽 聽 聽 :lAllowColSwapping 聽 := .F.
聽 聽 聽 :lAllowColHiding 聽 聽 := .F.
聽 聽 聽 :lRecordSelector 聽 聽 := .F.
聽 聽 聽 :nColDividerStyle 聽 聽:= LINESTYLE_LIGHTGRAY
聽 聽 聽 :nRowDividerStyle 聽 聽:= LINESTYLE_LIGHTGRAY
聽 聽 聽* :nRowDividerStyle 聽 聽:= LINESTYLE_NOLINES
聽 聽 聽 :nColDividerStyle 聽 聽:= LINESTYLE_LIGHTGRAY
聽 聽 聽 :CreateFromCode()
聽 聽 聽End



聽 聽 聽return nil





I could also use a Tpanel but then it's not good because I would like the child not to go in that part that is the area in the window (owndclient) is determined as it happens with the tbar
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I 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
Posts: 344
Joined: Sat Jul 22, 2006 09:04 PM
Re: Test Windows Mdi with panel right
Posted: Sun May 01, 2022 11:23 PM

Silvio si tienes un video de lo que haces con VB seria bueno para entender bien que quieres lograr.
Saludos
Marcelo

FWH - Harbour - BCC7 - PellesC
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Test Windows Mdi with panel right
Posted: Mon May 02, 2022 01:34 AM
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Test Windows Mdi with panel right
Posted: Mon May 02, 2022 06:56 AM
Marcelo Roggeri wrote:Silvio si tienes un video de lo que haces con VB seria bueno para entender bien que quieres lograr.
Saludos
Marcelo






I think is a class type "Navigation Pane Control"
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Test Windows Mdi with panel right
Posted: Mon May 02, 2022 06:59 AM
cnavarro wrote:https://bitbucket.org/fivetech/fivewin-contributions/downloads/testmdi.prg


I not mean it !!! see the gif animation
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I 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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Test Windows Mdi with panel right
Posted: Mon May 02, 2022 09:24 PM
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Test Windows Mdi with panel right
Posted: Mon May 02, 2022 10:07 PM
cnavarro wrote:


it's no the same
if you look carefully at the panel that opens it does not shrink the window and the Mdi area is always the same as it happens when you try to insert a buttonbar on the left. the test I did above uses a buttonbar just to make you understand what I meant. If I wanted to make an explorerbar with a splitter it was another story.

If you look closely at the example you will see that when I press the button the procedure opens a panel but there is no splitter
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I 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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Test Windows Mdi with panel right
Posted: Mon May 02, 2022 11:16 PM

Ok, then with oExplorerBar:Show() or oExplorerBar:Hide() can work

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Test Windows Mdi with panel right
Posted: Mon May 02, 2022 11:48 PM
cnavarro wrote:Ok, then with oExplorerBar:Show() or oExplorerBar:Hide() can work



explorerbar not have the same entity of a buttobar control

pls see this test
Code (fw): Select all Collapse
聽 聽 #include "fivewin.ch"



聽 聽 //----------------------------------------------------------------------------//

聽 聽 聽 聽 function Main()

聽 聽 聽 聽 聽 聽local oWnd, oBarRight, oBar

聽 聽 聽 聽 聽 聽SetGetColorFocus()

聽 聽 聽 聽 聽 聽DEFINE WINDOW oWnd MDI TITLE "test panel on dx" 聽HSCROLL VSCROLL
聽 聽 聽 聽 聽 聽DEFINE BUTTONBAR oBarRight OF oWnd SIZE 200,32 2007 RIGHT
聽 聽 聽 聽 聽 聽DEFINE BUTTONBAR oBar OF oWnd SIZE 100,32 2007
聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽ACTIVATE WINDOW oWnd ;
聽 聽 聽 聽 聽 聽ON INIT TESTBROWSE(oBarRight)

聽 聽 聽 聽 return nil

聽 聽 聽 聽 //----------------------------------------------------------------------------//

聽 聽 聽 聽 聽FUNCTION TESTBROWSE(oBarRight)
聽 聽 聽 聽 聽 聽LOCAL oBrw
聽 聽 聽 聽 聽 聽local adata:= {;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽{"Bari",55,66,99,88,77},;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽{"Pescara",55,66,99,88,77},;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽{"Ancona",55,66,99,88,77},;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽}
聽 聽 聽 聽 聽 聽 @ 2,1 XBROWSE oBrw OF oBarRight SIZE 200,oBarRight:nWidth-10 PIXEL NOBORDER;
聽 聽 聽 聽 聽 COLS 1,2,3,4,5,6;
聽 聽 聽 聽 聽 HEADERS "Ruota", "E1", "E2", "E3", "E4", "E5" ;
聽 聽 聽 聽 聽 SIZES 聽30,35,35,35,35,35 聽;
聽 聽 聽 聽 聽 ARRAY adata ;
聽 聽 聽 聽 聽 CELL LINES

聽 聽 聽 聽 聽 聽 WITH OBJECT oBrw
聽 聽 聽 聽 聽 :nRowHeight 聽 聽:= 19
聽 聽 聽 聽 聽 :nClrBorder := CLR_GRAY
聽 聽 聽 聽 聽 :lDrawBorder := .t.
聽 聽 聽 聽 聽 :nColorBox := CLR_HRED
聽 聽 聽 聽 聽 :nMarqueeStyle 聽 聽 聽 := MARQSTYLE_HIGHLWIN7
聽 聽 聽 聽 聽 *:lHeader 聽 聽 聽 聽 聽 聽 := .f.
聽 聽 聽 聽 聽 :lHscroll 聽 聽 聽 聽 聽 聽:= .f.
聽 聽 聽 聽 聽 :lvscroll 聽 聽 聽 聽 聽 聽:= .f.
聽 聽 聽 聽 聽 :l2007 聽 聽 聽 聽 聽 聽 聽 := .F.
聽 聽 聽 聽 聽 :l2015 聽 聽 聽 聽 聽 聽 聽 := .f.
聽 聽 聽 聽 聽 :nStretchCol 聽 聽 聽 聽 := STRETCHCOL_WIDEST
聽 聽 聽 聽 聽 :lAllowRowSizing 聽 聽 := .F.
聽 聽 聽 聽 聽 :lAllowColSwapping 聽 := .F.
聽 聽 聽 聽 聽 :lAllowColHiding 聽 聽 := .F.
聽 聽 聽 聽 聽 :lRecordSelector 聽 聽 := .F.
聽 聽 聽 聽 聽 :nColDividerStyle 聽 聽:= LINESTYLE_LIGHTGRAY
聽 聽 聽 聽 聽 :nRowDividerStyle 聽 聽:= LINESTYLE_LIGHTGRAY
聽 聽 聽 聽 聽* :nRowDividerStyle 聽 聽:= LINESTYLE_NOLINES
聽 聽 聽 聽 聽 :nColDividerStyle 聽 聽:= LINESTYLE_LIGHTGRAY
聽 聽 聽 聽 聽 :CreateFromCode()
聽 聽 聽 聽 聽End



聽 聽 聽 聽 聽return nil




if you use explorerbar you don't have Hscroll and Vscroll at the same point

because the internal area of the main window does not end before the explorerbar as in the picture I posted

it would take a control similar to the buttobar but that has only one button and that opens a panel (even with a vertical scroll) in which to insert dialogs
With explorerbar you can't build that

this evening the vb6 exe is bloken and I saw it use these controls : https://github.com/ComponentFactory/Krypton
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I 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
Posts: 344
Joined: Sat Jul 22, 2006 09:04 PM
Re: Test Windows Mdi with panel right
Posted: Tue May 03, 2022 08:57 AM

Silvio puedes poner una BUTTONBAR, a la derecha con un ancho de 50 y un icono similar, luego ocultas el browse y lo muestras al pulsar.
Hice algo similar, a la tarde de Hs Argentina te paso c{odigo.
Lo de Cristobal es muchoa mas pro
Saludos

FWH - Harbour - BCC7 - PellesC
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Test Windows Mdi with panel right
Posted: Tue May 03, 2022 10:26 AM

La soluci贸n de Crist贸bal no es lo que quiero decir, tienes que fijarte en el espacio gris que determina el 谩rea interna de la ventana en modo MDI, si creas una ventana mdichild se posiciona en el 谩rea gris que tienes a los lados tendr谩 el scrolling hscroll y vscroll. Di un ejemplo porque tomar铆a una clase como la tbuttonbar que no afecta el 谩rea interna de la ventana mdi. Si usa la soluci贸n de Crist贸bal, no tendr谩 el desplazamiento de vscroll y hscroll porque debe colocar la clase Explorer dentro del 谩rea gris de la ventana mdi. Espero haber explicado la situaci贸n.

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I 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

Continue the discussion