dialog with tree and other dialog

Post Reply
User avatar
Silvio.Falconi
Posts: 7168
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 2 times

dialog with tree and other dialog

Post by Silvio.Falconi »

Image

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
User avatar
Antonio Linares
Site Admin
Posts: 42599
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 41 times
Been thanked: 88 times
Contact:

Re: dialog with tree and other dialog

Post by Antonio Linares »

Dear Silvio,

Fully coded or using resources ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 7168
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 2 times

Re: dialog with tree and other dialog

Post by Silvio.Falconi »

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
User avatar
Otto
Posts: 6414
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 30 times
Been thanked: 2 times
Contact:

Re: dialog with tree and other dialog

Post by Otto »

Dear Antonio,
I think this would be a nice task tor webview.

I am working on a DMS with similar layout.

Best regards,
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Silvio.Falconi
Posts: 7168
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 2 times

Re: dialog with tree and other dialog

Post by Silvio.Falconi »

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

Image



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
User avatar
Silvio.Falconi
Posts: 7168
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 2 times

Re: dialog with tree and other dialog

Post by Silvio.Falconi »

I made a test but not run

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

Code: Select all | Expand

// 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
User avatar
Antonio Linares
Site Admin
Posts: 42599
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 41 times
Been thanked: 88 times
Contact:

Re: dialog with tree and other dialog

Post by Antonio Linares »

Dear Silvio,

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

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 7168
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 2 times

Re: dialog with tree and other dialog

Post by Silvio.Falconi »

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
Post Reply