Treeview Print Example
Most of the objetcts are necessary, because they are
referenced by basic classes that I use.

The main window in focus is w_treeviewprint
with a treeview from class u_treeview on it 

The Treeview functions are based on two
main objects

u_treeview    and   n_tvbusiness  (using d_printtreeitem)
these objects should be sufficient to build the functions.


the printfunction  in n_tvbusiness uses   d_printtreeitem   to build the entire
print datawindow within a datastore.

To generate a preview I use w_printcomposite, but you
can use rowscopy to get the data from datastore, to a datawindow 
and dislay them. There a three ways for printing, therefore
you will get an inputdialog to choose before printing.

The basic for printing a treeview is, to define according
Bitmaps (or jpg ) to the Treepictures (icons).
This has to be done for the Pictures, Statepictures, and Overlaypictures.
(the bitmaps are part of the .zip file)

See the constructor of the Treeview within  w_treeviewprint  to understand,
how I have done it.

Bitmaps can not have Overlaypictures.
Because it is to much for me, to print three pictures, I made the following decision.
TreeviewItems with Statepicture are printed with the Statepicture
TreeviewItems with Overlaypicture are printed with the Overlaypicture as Statepicture
TreeviewItems with Statepicture and Overlaypicture are printed with the Statpicture

Beside Printing, there are some other usefull function in n_tvbusiness implemented.
- Expand a node and all its childreen
- Expand a mode and the next level
- Collapse a node and all its children
- Collapse the tree (all roots and all its children)
Also there are some functions to store treeviewitems in a datawindow and insert
them into the treeview. There is one restriction. Treevieitem.Data must be a string or empty.  
See the functions to duplicate a node or the tree.

You will recognize, that there are some other features in the application.
- Tooltips (using Tag) for Picture and Commandbuttons using u_picturebutton, u_commandbutton, n_dotiming
  just place u_picturebutton on a window and it will work

- Resizeservice for Windows and Userobjects using n_wbusiness   n_ubusiness 
  n_wbusiness.of_resizeaddcontrol(dc_x, dc_y, dc_width, dc_heigt)

- Microhelp (using Tag) for all controls, telling them there Microhelpparent using
   n_fbusiness.of_controlstrigger(windowforcontrolcollect,w_MicrohelpParent,"ue_sethelpparent"
   then capture mousemove of the control and trigger w_MicrohelpParent

- Basic for a lot of reducing complexity, is to get a reference of the next parent window
  in the constructor of every control. So you can use iw_ControlParent within every control
  no matter if it is on a tabpage

Regards
Martin Bremer
E-Mail: m-bremer@wellcom.de (prefered)
or   martinbremer@compuserve.com  
 //EOF



