dialog with tree and other dialog

dialog with tree and other dialog

Postby Silvio.Falconi » Thu Feb 17, 2022 12:10 pm

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 November 2023 - January 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog with tree and other dialog

Postby Antonio Linares » Thu Feb 17, 2022 3:54 pm

Dear Silvio,

Fully coded or using resources ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42100
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: dialog with tree and other dialog

Postby Silvio.Falconi » Thu Feb 17, 2022 5: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 November 2023 - January 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog with tree and other dialog

Postby Otto » Thu Feb 17, 2022 6: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

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: dialog with tree and other dialog

Postby Silvio.Falconi » Fri Feb 18, 2022 9: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

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 November 2023 - January 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog with tree and other dialog

Postby Silvio.Falconi » 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: Select all  Expand view  RUN
// 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 November 2023 - January 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog with tree and other dialog

Postby Antonio Linares » Sun Feb 20, 2022 5:10 pm

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
Antonio Linares
Site Admin
 
Posts: 42100
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: dialog with tree and other dialog

Postby Silvio.Falconi » Sun Feb 20, 2022 5: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 November 2023 - January 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: 7063
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Silvio.Falconi and 75 guests