FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour print Treeview
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
print Treeview
Posted: Tue May 07, 2019 02:34 PM
Hi,
I have a dialog from .rc file, this dialog has a treeview Redefined:
Code (fw): Select all Collapse
DEFINE DIALOG oDlg RESOURCE "TREEDIS" FONT oFont TITLE "Visualizza distinta"

    REDEFINE SAY o_get[02] PROMPT m_GET[02] ID 201 OF oDlg
    REDEFINE SAY o_get[03] PROMPT m_GET[03] ID 202 OF oDlg  
    REDEFINE TREEVIEW oTree ID 60 OF oDlg COLOR CLR_BLACK, CLR_WHITE  //size 400 , 180  

    REDEFINE BTNBMP OBtnEscI ID 2 OF oDlg RESOURCE "chiudi"  2007   ACTION (oDlg:End() ) 
    REDEFINE BTNBMP OBtnExc  ID 3 OF oDlg RESOURCE "tree"   2007  ;


and this is the dialog:


how can I to print or save in PDF the Treeview?

thanks.
FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: print Treeview
Posted: Thu May 09, 2019 09:27 AM

I'm afraid you must make .....to hand or snap of the dialog
if the trre is adatabse you can make it easy

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: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: print Treeview
Posted: Thu May 09, 2019 05:24 PM

Damiano,

oTree:HardCopy()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Re: print Treeview
Posted: Mon May 13, 2019 06:47 AM

hardcopy prints just actual view.
I have a lot of tree of BOM (bill of materials) with dozens of nodes, I can not to print whit hardcopy, scroll dialog and print next nodes with another hardcopy in another page.

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: print Treeview
Posted: Mon May 13, 2019 07:29 AM

Hello,
I use winexec with DOS command tree >TXT. Then I polish TXT with strtran() function.
Best regards
Otto

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: print Treeview
Posted: Mon May 13, 2019 07:37 AM

Hello,
Maybe better tree >tree.rtf
Best regards
Otto

Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Re: print Treeview
Posted: Mon May 13, 2019 08:22 AM

hi Otto,
can you post your code?
thank you

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: print Treeview
Posted: Mon May 13, 2019 09:06 AM
Hello,
this is my code.
Regards
Otto
Code (fw): Select all Collapse
#include "FiveWin.ch"

function main()
    local cText := "tree >mytree.txt"
    local cReturn := ""
    memowrit( "xtree.bat", cText)
    waitrun("xtree.bat")
    cReturn := memoread( "mytree.txt" ) 
    cReturn := strTran( cReturn, "Ã",  chr(25) )
    cReturn := strTran( cReturn, "ÄÄÄ",  chr(6)+chr(6)+chr(6) )
    cReturn := strTran( cReturn, "ÄÄÄ",  chr(6)+chr(6)+chr(6) )
    cReturn := strTran( cReturn, "³", "    "  )
    cReturn := strTran( cReturn, "À",  chr(3) )

    ? cReturn
    
return nil



Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Re: print Treeview
Posted: Tue May 14, 2019 03:06 PM

Thank you Otto.

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)

Continue the discussion