FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour dialog with tree and other dialog
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
dialog with tree and other dialog
Posted: Thu Feb 17, 2022 12:10 PM


How I can make a dialog with a tree at left, one splitter and dialogs at right
when I select an item must open the dialog on the space right
as a configuration of a app
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: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: dialog with tree and other dialog
Posted: Thu Feb 17, 2022 03:54 PM

Dear Silvio,

Fully coded or using resources ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: dialog with tree and other dialog
Posted: Thu Feb 17, 2022 05:52 PM

i wish make on source code
can you make a little sample test?

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: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: dialog with tree and other dialog
Posted: Thu Feb 17, 2022 06:13 PM
Dear Antonio,
I think this would be a nice task tor webview.

I am working on a DMS with similar layout.

Best regards,
Otto

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: dialog with tree and other dialog
Posted: Fri Feb 18, 2022 09:12 AM
Otto wrote:Dear Antonio,
I think this would be a nice task tor webview.

I am working on a DMS with similar layout.

Best regards,
Otto




I need on fwh and windows not on internet explorer ,
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: dialog with tree and other dialog
Posted: Sat Feb 19, 2022 11:28 AM
I made a test but not run

Testree5.prg run on Windows but I need to use a dialog

Code (fw): Select all Collapse
// Using a TreeView with checkboxes and checking their status

#include "FiveWin.ch"
#include "Splitter.ch"


function Main()
   local nHt      := Int( ScreenHeight() * 0.3 )
   local nWd      := 600
   local oDlg, oTree,oFont,oBold
   local oSplit
   local nSplit:=100
   local oExbar

  * DEFINE ICON oIcon RESOURCE "ICON1"
   DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -14
   DEFINE FONT oBold NAME 'Tahoma' SIZE 0, -12  BOLD

   DEFINE DIALOG oDlg SIZE  nWd,nHt   PIXEL ;
   COLOR CLR_BLACK,  nRgb( 245,244,234)  FONT oFont  ; //ICON oIcon
   TITLE "Configurazione"   STYLE nOr( WS_OVERLAPPEDWINDOW )

  oExBar := TPanel():New(0,0,oDlg:nBottom,nSplit, oDlg  )
  oExBar:SetColor(0,RGB(143,172,230))



   *   oTree:OnClick = { || CheckStatus( oTree, oTree:aItems ) }


      @ 0,nSplit SPLITTER oSplit ;
      VERTICAL _3DLOOK ;
      PREVIOUS CONTROLS oExBar ;
      HINDS CONTROLS oDlg ;
      SIZE 2,oDlg:nBottom  PIXEL ;
      LEFT MARGIN 20 ;
      RIGHT MARGIN 25 ;
      OF oDlg


        oDlg:bResized  := <||
        local oRect         := oDlg:GetCliRect()
                  oExbar:ntop          := oRect:nTop
                  oExBar:nBottom       := oRect:nheight
                  oSplit:nBottom       := oRect:nbottom

                  RETURN nil
                   >


                   ACTIVATE DIALOG oDlg CENTERED ;
                   ON INIT (oDlg:resize(),;
                            CreateTree(oExBar,oTree)  )

                   return nil
//-------------------------------------------------------------------//
Function CreateTree(oExBar,oTree)
   oTree := TTreeView():New( 0, 0, oExBar,,,,,oExbar:nWidth,oExbar:nBottom,,.t.)
   BuildTree( oTree )
   oExBar:oClient :=oTree
return oTree

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

function BuildTree( oTree )

   local oMenu := Array( 2 ), oSubMenu := Array( 3 )

   oMenu[ 1 ]:= oTree:Add( "Principal" )
      oSubMenu[ 1 ]:= oMenu[ 1 ]:Add( "Imprimir..." )
      oSubMenu[ 1 ]:SetCheck( .T. )

   oMenu[ 2 ]:= oTree:Add( "Proyectos" )
      oSubMenu[ 2 ]:= oMenu[ 2 ]:Add( "Definir Proyectos" )
      oSubmenu[ 3 ]:= oMenu[ 2 ]:Add( "Actualización datos" )

   oTree:Expand()

return nil

function CheckStatus( oTree, aItems )

   local n

   for n = 1 to Len( aItems )
      MsgInfo( oTree:GetCheck( aItems[ n ] ) )
      CheckStatus( oTree, aItems[ n ]:aItems )
   next

return nil
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: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: dialog with tree and other dialog
Posted: Sun Feb 20, 2022 05:10 PM
Dear Silvio,

It seems as testtre2.prg is a better example to start with as a template

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: dialog with tree and other dialog
Posted: Sun Feb 20, 2022 05:34 PM

Antonio,
it is on Window I think

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