{"text_format":"1","workbook":"xlsx","n_sheets":6,"sheets":["Demo","Instructions","clsTreeView","clsNode","Versions","VB6 Treeview Methods"],"not_rendered":{"charts":0,"images":0,"macros":1,"external_links":0,"defined_names":2,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Demo","index":0,"n_rows":100,"n_cols":3,"rows_kept":100,"cut":false,"hidden":false,"merged":[]}
["VBA Treeview Demo"]
[]
["The demo form demonstrates some of the features of the VBA Treeview."]
["Most of the options can be changed while the tree is running and the treeview properties updated."]
["Changing the purple checkboxes while the treeview is running will result in the treeview being cleared and recreated."]
[]
["Demo Treeview",null,"Populates the treeview with some sample data."]
[null,null,"If the Checkboxes option is ticked Tri-State is enabled."]
[]
["Demo Treeview with icons",null,"Similar data but nodes show icons, also alternate rows of node 4D's child nodes are highlighted. "]
[null,null,"To demonstrate the difference with the above demo Tri-State is not enabled with checkboxes."]
[null,null,"If the \"Full Width\" option is selected additional Image controls are created for the icons, "]
[null,null,"otherwise icons are embedded in the caption Labels and icon overheads are minimal."]
[]
["Clear the Treeview",null,"Removes all node controls and cleanly destroys clsNode instances."]
[]
["Form Caption",null,"Info returned when the treeview is first populated and on subsequent refreshes"]
[null,null,"Note this info is only returned if the project includes the compile constant DebugMode = 1, see Project properties (right click VBA Project in the VBE"]
[null,"Seconds","Time to build or refresh the Treeview (excludes writing the node data)"]
[null,"Nodes","# nodes (clsNode) referenced in the Treeview's global nodes collection"]
[null,"Created","# of nodes that have been displayed at least once and associated controls created"]
[null,"Visible","# of nodes currently visible in the treeview, ie expanded "]
[null,"Controls","# of node controls created. Each node may have between 1 and 7 associated controls (mainly Labels)"]
[null,null,"Note, individual node controls are only created \"on demand\",  when first displayed because all the node's parent nodes are expanded"]
[]
["# children textbox",null,"# of child nodes that will be created for the node \"4 D\", for stress testing with different combinations of settings"]
[null,null,"Changing values will give a rough indication of performance with the given combination of settings"]
[null,null,"Start-up time increases exponentially with quantity of controls that need to be created, see the form caption"]
[null,null,"With a large # of nodes the treeview will load faster if Show Lines is not selected, and with the Icons demo if the Full Width option is not selected."]
[]
["Checkbox options"]
[null,"Full Width","True:      Node label widths extend beyond the width of the treeview, makes for clear highlighting of the selected node and BackColor formats if applied"]
[null,null,"False:     Label widths are 'autosized' to the text width"]
[null,null,"If node icons are used an additional image control is created for use with 'full width'."]
[null,null,"A large tree using node icons will load faster if 'full width' is not applied."]
[]
[null,"Show Lines","Whether or not to show lines may be a matter of aesthetics or needs depending on the tree."]
[null,null,"Try experimenting with different indentation widths (see the spin button)."]
[null,null,"With a large tree start-up time may be up to 2x faster if lines are not shown."]
[]
[null,"Root button","True:   Root nodes show expander buttons and the entire Treeview can be collapsed to the Root level"]
[null,null,"False:   Root nodes cannot be collapsed"]
[]
[null,"Checkboxes","Key space or click to change the value"]
[null,null,"The NodeCheck change event is trapped in the form, and the info label updated"]
[null,null,"Tri-State functionality is automatically enabled with the first demo but not with the \"Icons\" demo"]
[]
[null,"Checkbox icons","By default checkboxes are Labels with Marlett font, an \"a\" character appears as a tick."]
[null,null,"Use of icons can make the checkboxes more realistic."]
[null,null,"If icons are used the images must be available in the workbook, on a sheet or as in the demo (hidden) on the form."]
[null,null,"The demo form includes a checkbox images as examples."]
[]
[null,"Show Expanders","Display  +/- buttons, or expander icons if the following option is checked"]
[]
[null,"Expander icons","By default the expander buttons are Labels with +/- text characters that are toggled."]
[null,null,"If icons are used the images must be available in the workbook, on a sheet or as in the demo (hidden) on the form."]
[null,null,"The demo includes pseudo WinXP and Win7 Explorer type expander icons, or you can customize your own."]
[]
[null,"Allow Editing","User can manually edit the node."]
[null,null,"Double click or key F2 on a selected node.  Key Enter to apply the edit or Esc to abort."]
[null,null,"Optionally the edited node can be sorted after Enter (the demo sets the optional sort option if manual editing is enabled)."]
[]
[null,"Test Sort","An efficient sort algorithm has been implemented for this treeview."]
[null,null,"If the option is ticked before running, random text values are written to the child-nodes of node \"4D\", then its child nodes are sorted."]
[null,null,"If the treeview is running, clicking the button will add similar to the active node's child-nodes"]
[null,null,"(expect the colour banding in the 'with icons\" demo to go out of order, simple code could reinstate the banding)"]
[]
["Spinners"]
[null,"Indentation","Default is 15 points (20 in Mac)"]
[]
[null,"NodeHeight","Default, automatically adjusts to the Font size or checkbox size or Icon size, whichever is the larger"]
[]
[null,"Font size","The font size and other default label properties are adopted from the parent frame, \"frmDemo\""]
[null,null,"The spinner changes the font size of the Frame container"]
[null,null,"Only change the frames properties (such as Font) before populating the treeview"]
[]
["Buttons",null,"See the example routines behind the buttons"]
[null,null,"(There are different commented examples behind the  Dump Data button, to dump all data or a snapshot of the visible nodes)"]
[]
["Treeview Events"]
[null,"Click","Node click, returns a reference to the node when activated."]
[null,null,"An info label on the form is updated with some details about the selected node."]
[null,null,"As written the Click event is only raised the when the node is first selected and activated. If preferred the Click event is  always raised, remove or comment the If / End If check in clsNode!mctlControl_Click()"]
[]
[]
[null,"NodeCheck","Returns a reference to the node and it's new checked value (spacebar or checkbox click)"]
[]
[null,"KeyDown for Move & Copy"]
[null,null,"Key events are trapped in the demo form, in particular Ctrl-x, Ctrl-c and Ctrl-v to instigate move or copy, and Del to delete"]
[]
[null,"AfterLabelEdit","User's manual edit is trapped in the demo form and the action can be validated, amended or cancelled."]
[null,null,"Try entering \"123\" and \"456\""]
[null,null,"Note the EnableLabelEdit property includes the option bAutoSort."]
[null,null,"In the demo AutoSort is enabled, all siblings are resorted after a node has been manually edited."]
[]
[null,"Most other Frame and Label events can easily be \"raised\" and similarly trapped in the Form"]
[]
[]
["PT 27-02-2013"]
["updated 15-04-2013"]

{"sheet":"Instructions","index":1,"n_rows":87,"n_cols":10,"rows_kept":87,"cut":false,"hidden":false,"merged":[]}
["Word and Access users see additional notes below"]
[]
["The Treeview code is contained in the class modules clsTreeView and clsNode"]
["Export and import the two class modules into your project, or add to class modules, name them, and copy/paste the code"]
["While developing and using the DebugMode = 1 conditional compiler (see below) you may also find it useful to import the modDemo module"]
[]
["Public Methods and Properties in the class modules are documented in the adjacent sheets clsTreeView and clsNode"]
[]
["Your Userform should normally include as a minimim:"]
[]
[null,"A Frame control as the container for the treeview, suggest copy/paste the frame in the demo named \"frmTreeControl\" into your form"]
[]
[null,"At the top of the form code"]
[null,null,"Private WithEvents mcTree As clsTreeView"]
[]
[null,"Before you can do anything with treeview you will need to create an instance of the clsTreeView"]
[null,null,"Set mcTree = New clsTreeView"]
[null,"You can maintain the instance throughout the life of the userform. If re-using the instance call mcTree.NodesClear before creating a new treeview"]
[]
[null,"Add a reference for the Treeview Frame container"]
[null,null,"Set mcTree.TreeControl = Me.frmTreeControl"]
[]
[null,"Add Treeview properties to the mcTree reference, eg Indentation, Checkboxes, show connector lines, and many more as required"]
[null,"Add a Root node and populate with child nodes. The Treeview supports multiple Root nodes if required."]
[null,"When properties and nodes have been added build the tree with"]
[null,null,"mcTree.Refresh"]
[]
[null,"Multiple internal parent/child object references are created between the clsTreeView and clsNode modules so they can comminicate both ways."]
[null,"It is important these references are explicitly destroyed when done with the Treeview, otherwise the objects may remain lost in memory."]
[null,null,"Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)"]
[null,null,"'Make sure all objects are destroyed"]
[null,null,"    If Not mcTree Is Nothing Then"]
[null,null,"        mcTree.TerminateTree"]
[null,null,"    End If"]
[null,null,"    Set mcTree = Nothing"]
[null,null,"End Sub"]
[null,"alternatively, mcTree.TerminateTree could be called in the UserForm's Terminate event "]
[null,"(see documentation for TerminateTree and NodesClear in the adjacent sheet)"]
[]
[null,"If the mcTree reference has been declared WithEvents, select mcTree in the top left combo event stubs in the top right combo "]
[null,null,"Click, NodeCheck, KeyDown, AfterLabelEdit"]
[null,"See the example events in the demo form in the section \"Treeview Events\" in the demo form"]
[null,"All the code for mouse DblClick, Down and Up events is included but commented, see notes in clsTreeView!NodeEventRouter"]
[]
[null,"Optionally include Frame container Enter & Exit events to let the TreeView know when it gains or loses focus"]
[null,null,"Private Sub frmTreeControl_Enter() "]
[null,null,"    If Not mcTree Is Nothing Then"]
[null,null,"        mcTree.EnterExit False"]
[null,null,"    End If"]
[null,null,"End Sub"]
[null,null,"Private Sub frmTreeControl_Exit(ByVal Cancel As MSForms.ReturnBoolean)"]
[null,null,"    If Not mcTree Is Nothing Then"]
[null,null,"        mcTree.EnterExit True"]
[null,null,"    End If"]
[null,null,"End Sub",null,null,null,null,null,null,"    "]
[null,"If these events are included in your form the ActiveNode highlight will change to indicate if the Treeview is in focus"]
[null,"Ideally these events would be trapped with WithEvents in clsTreeview, however Enter/Exit events are only exposed in the Userform module"]
[]
[null,"If you want to use icons, even if only for expanders or checkboxes, add a Frame control with suitable images for the icons (or copy from the demo)"]
[null,"Hide and deactivate the frame when the form loads, eg"]
[null,null,"Private Sub UserForm_Initialize()"]
[null,null,"    Me.frmImageBox.Visible = False"]
[null,null,"    Me.frmImageBox.Enabled = False"]
[]
[null,"While developing it can be helpful to include this conditional compile constant: DebugMode = 1"]
[null,"Right click the Project in project-explorer, Project Properties, Conditional Compile Arguments (see similar in this demo project)"]
[null,"If using this debug constant you will need the globable variables and ClassCounts routine in the modDemo module"]
[null,"Normally you will want to remove the constant before distributing"]
[]
[null,"Tips for developing large Treeviews, say with 1000+ nodes"]
[null,"Note the details returned to the form's caption, when the treeview is first created and whenever Refresh is called (requires the Conditional compile constant DebugMode = 1)"]
[null,"Node controls (for captions, expanders, lines, checkboxes & icons) are created on an 'as-needs' basis the first time nodes are to be"]
[null,"displayed behind expanded nodes; if the user collapses a branch the controls are hidden for future reuse. "]
[null,"Consider not displaying all nodes when first creating the treeview, in other words reduce the number of initially expanded nodes (see the Expanded property), "]
[null,"controls will be created later if/when the user expands a branch."]
[null,"Not using lines (ShowLines property) can significantly reduce the time to create and display a large treeview and when calling Refresh (say when a branch is expanded)"]
[]
["Word and Access users"]
[null,"The class modules in this Excel demo can be used with one small edit:"]
[null,"At the top of clsTreeView module in the declarations section Edit or add this compile constant"]
[null,null,"#Const HostProject = \"Word\" or \"Access\""]
[]
[null,"If you see newer versions of the Excel download than available for Word or Access, use the class modules from the latest Excel demo"]
[]
["Access implementation"]
[null,"Access has its own Forms but the VBA treeview must be created in a Userform, contained in an Access SubForm"]
[null,"Refer to the Access demo"]

{"sheet":"clsTreeView","index":2,"n_rows":363,"n_cols":19,"rows_kept":363,"cut":false,"hidden":false,"merged":[]}
["clsTreeView",null,"Public Properties, Subs and Functions"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"list for the dropdown"]
[null,"Property","ActiveNode [ = clsNode Object ]",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   ActiveNode"]
[null,null,null,"Sets and highlights or returns a reference to the active (selected) node",null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Func   AddRoot"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   AppName"]
[null,null,null,"Remarks:","After setting a new active node call ScrolltoView()",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Changed"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   CheckBoxes"]
[null,null,null,"Example","Set myNode = Treeview.ActiveNode",null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    CheckboxImage"]
[null,null,null,null,"Set Treeview.ActiveNode = myNode",null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    Copy"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   EnableLabelEdit"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    EnterExit"]
[null,"Function","AddRoot (Optional sKey As String, Optional sCaption As String, Optional vImageMain, Optional vImageExpanded) As clsNode",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    ExpanderImage"]
[null,null,null,"Adds a Root node to the Treeview",null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    ExpandToLevel"]
[null,null,null,"[sKey]","The Key for the global Nodes collection.",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   FullWidth"]
[null,null,null,"[sCaption]","The root node's value as will be displayed",null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub     ImageAdd"]
[null,null,null,"[vMainImage]","The string name of an image control the Frame, or its Key or numeric index in a collection passed with the Images property",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Images"]
[null,null,null,"[vExpandedImage]","(ditto) if a second icon is required to indicated expanded",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Indentation"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   LabelEdit"]
[null,null,null,"Remarks:","There can be multiple root nodes",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   LinesColor"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    Move"]
[null,null,null,"See also","RootNodes, RootButton",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   MoveCopyNode"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Func   NodeAdd"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   NodeHeight"]
[null,"Property","AppName [ = string]",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    NodeRemove"]
[null,null,null,"Returns or sets a name, eg for use in msgbox captions",null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Nodes"]
[null,null,null,"Default:","\"TreeView\"",null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    NodesClear"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    PopulateTree"]
[null,"Property","Changed [=  boolean]",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    Refresh"]
[null,null,null,"Returns True if one or more node values have been changed",null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   RootButton"]
[null,null,null,"Example","bIsDirty = TreeView.Changed",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   RootNodes"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    ScrollToView"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    SetScrollbars"]
[null,"Property","CheckBoxes (Optional bTriState as boolean) [=  boolean]",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   ShowExpanders"]
[null,null,null,"Returns or sets a value that determines if checkboxes are shown",null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    ShowLines"]
[null,null,null,"Default:","False",null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    TerminateTree"]
[null,null,null,"[bTriState]","Sets or returns a value that determines if TriState is enabled, see remarks"]
[]
[null,null,null,"Remarks:","If TriState is enabled the following occurs when user changes a Checked value"]
[null,null,null,null,null,"All parents' values will be set appropriately according to their respective childnodes' values"]
[null,null,null,null,null,"All descendants' values will be applied to the same checked value, 0 or - 1"]
[null,null,null,null,"If Checked values are to be applied before showing the tree, consideration should be given as to "]
[null,null,null,null,"whether to set the Checkboxes property and bTriState before or after applying Checked values"]
[]
[null,null,null,"See also:","CheckBoxImage"]
[null,null,null,null,"Nodes.Checked"]
[null,null,null,"In the demo form, if the Checkboxes option is ticked TriState is enabled with the non-icons demo"]
[]
[null,"Sub","CheckboxImage (picFalse As StdPicture, picTrue As StdPicture, Optional picTriState As StdPicture)"]
[null,null,null,"Pre-loads checkbox images for checkbox controls instead using labels with a Marlet tick character"]
[null,null,null,"picFalse","StdPicture objects for not-checked, checked and (optional) tri-state checkbox icons"]
[null,null,null,"picTrue","ditto"]
[null,null,null,"picTriState","ditto"]
[null,null,null,null," Example, picTrue might be set as  =  Me.frmImages.Controls(\"CheckboxTrue\") where CheckBoxTrue is an image control"]
[]
[null,null,null,"Remarks:","If checkbox images are not pre loaded, ticks are applied as Marlett font text characters"]
[]
[]
[null,"Sub","Copy (cSource As clsNode, cDest As clsNode, Optional vBefore, Optional ByVal vAfter, Optional ByVal bShowError As Boolean)"]
[null,null,null,"Clones the source node with all child nodes its decendents (if any), and adds the clone to the destination node"]
[null,null,null,"cSource","the node to be copied"]
[null,null,null,"cDest","the node to be copied to"]
[null,null,null,"[vBefore/vAfter]","Numeric index or string Key of an existing Node in the Destination node's collection of ChildNodes"]
[null,null,null,"[bShowError]","If true the procedure will display an error message"]
[null,null,null,null,"If false an error will be raised to the calling routine"]
[]
[null,null,null,"Remarks:","The Root node cannot be copied"]
[null,null,null,null,"If optional vBefore or vAfter is not supplied the node will be added as the last sibling"]
[null,null,null,null,"An error occurs if vBefore/vAfter are not valid, eg non existant Key, an index larger than current count of the destination's ChildNodes"]
[null,null,null,null,"Normally source and destination nodes should be validated before instigating Copy"]
[null,null,null,null,"See the Demo form how the method can be implmented with Ctrl-C, Ctrl-V"]
[]
[]
[null,"Property","EnableLabelEdit (Optional bAutoSort As Boolean, Optional bMultiLine as Boolean) [= boolean]"]
[null,null,null,"Sets or returns a value that determines if Node captions can be edited by the user"]
[]
[null,null,null,"[bAutoSort]","Automatically sort siblings after manually entering an edited a node"]
[]
[null,null,null,"[bMultiLine]","Retain any multi-line breaks in the user's edit, eg introduced with Ctrl+Enter or pasted text."]
[null,null,null,null,"After editing the caption will display the text on a single line with any breaks indicated with \"¶ \", easily adapted to say a bullet • if preferred."]
[null,null,null,null,"Any breaks will reappear in the edit box if the caption is re-edited and will be returned with the node's Caption property."]
[]
[null,null,null,null,"By Default False, any introduced line breaks are simply replaced with a double space"]
[]
[null,null,null,"Remarks:","Double click or press F2 to enter Edit mode, press Enter to apply the new text or Esc to abort."]
[null,null,null,null,"If AutoSort is applied, the Sort function's default order and compare methods are used"]
[null,null,null,null,"If bMultiLine is False any introduced line breaks will be replaced with a double space."]
[null,null,null,null,"In Demo for testing, in Demo1 both options are True and in Demo2 icons both options are False"]
[]
[null,null,null,null,"EnableLabelEdit = True is equivalent to LabelEdit = 0"]
[null,null,null,null,"(LabelEdit is currently included for compatability with the VB6 treeview but may be deprecated in future versions)"]
[]
[null,"Sub","EnterExit (bExit As Boolean)"]
[null,null,null,"bExit","Flag to indicate the Tree control has lost focus [True] or received focus [False]"]
[]
[null,null,null,"Remarks:","Calling EnterExit in turn applies appropriate colours for the active-node when the treeview gains or loses focus"]
[]
[null,null,null,null,"WithEvents in a class module does not expose the treeview's container frame's Enter / Exit events"]
[null,null,null,null,"However they can be trapped in the parent form and retrurned to the tree class"]
[null,null,null,null,"See Sub frmDemo_Enter() and Sub frmDemo_Exit() in the demo form"]
[]
[]
[null,"Sub","ExpanderImage(picMinus As StdPicture, picPlus As StdPicture)"]
[null,null,null,"Pre-loads expander images for expander controls instead using labels with +/- characters"]
[]
[null,null,null,"picPlus","StdPicture objects for Expanded and Collaped expander icons"]
[null,null,null,"picMinus","ditto"]
[]
[null,null,null,"Remarks:","By default the ShowExpanders property is True"]
[null,null,null,null,"If expander images are not pre loaded, +/- text characters ticks are applied requiring a pair of label controls for each expander"]
[null,null,null,null,"You may want to adjust the hardcoded size of the expander control to suit the size of your expander images"]
[null,null,null,null,"See  If mbExpanderImage Then  in the BuildTree() procedure and adjust .Width and .Height"]
[]
[]
[null,"Sub","ExpandToLevel (lExpansionLevel As Long, Optional bReActivate As Boolean = True)"]
[null,null,null,"Expands or collapses the entire tree to the given expansion level"]
[null,null,null,"lExpansionLevel","The level to expand to"]
[null,null,null,"bReActivate","(default = true) If collpasing nodes will hide the current activenode, active its closest parent"]
[]
[null,null,null,"Remarks:","The level for Root nodes is 0"]
[null,null,null,null,"Call mcTree.Refresh to update the Treview after calling ExpandToLevel"]
[]
[null,null,null,"See also:","ScrollToView to display a node  and expand its parents if necessary to view the node"]
[]
[]
[null,"Property","FullWidth [=  boolean]"]
[null,null,null,"Sets or returns a value that determines if nodes' highlight and BackColor formats will show the full width of the Treeview"]
[null,null,null,"Default:","False, highlighting extends only to the width of the text"]
[]
[null,null,null,"Remarks:","The property can only be changed before calling Refresh."]
[null,null,null,null,"If FullWidth is false node labels are autosized to the text width."]
[null,null,null,null,"Additional image controls are created for icons with FullWidth, "]
[null,null,null,null,"all controls in a large tree will be created significanty faster if FullWidth = False"]
[]
[]
[null,"Sub","ImageAdd (pic As StdPicture, sName As String)"]
[null,null,null,"Add a single image to the Treeview's icons collection"]
[]
[null,null,null,"pic","A StdPicture object or handle"]
[null,null,null,"sName","Name of the icon that will be referred to by Node.ImageMain or Node.ImageExpanded"]
[]
[null,null,null,"Remarks:","The Name must be unique, it is used as a Collection Key"]
[null,null,null,null,"Icons are associated with nodes with Node.ImageMain and Node.ImageExpanded"]
[null,null,null,null,"New icons can be added while the Treeview is running, associated with Nodes, and updated with Node.ImageUpdate"]
[]
[]
[null,"Property","Images [ = Frame or Collection Object]"]
[null,null,null,"Pre-load the Treeview's image collection for icons"]
[null,null,null,"Object","The object can be an Frame containing Controls assigned with Pictures, normally Image controls."]
[null,null,null,null,"The Object can also be can be a Collection of StdPicture objects each added to the collection with the image name as Key. "]
[]
[null,null,null,"Remarks:","Set  Images(objImages) before creating the Treeview with Refresh"]
[null,null,null,null,"Images will create a new intenal Collection, any images previously added with ImageAdd will be lost"]
[null,null,null,null,"See the demo for examples of adding images in a Frame or as a collection."]
[]
[null,null,null,"See also:","ImageAdd, Node.ImageMain, Node.ImageExpanded, Node.ImageUpdate"]
[]
[]
[null,"Property","Indentation [=  single]"]
[null,null,null,"Sets or returns a value that determines the horizontal indentation between Levels"]
[null,null,null,"Default: ","15 points"]
[]
[null,null,null,"Remarks:","If ShowLines is False a smaller value for Indentation may be appropriate"]
[]
[]
[null,"Property","LabelEdit (bAutoSort) [= long]"]
[null,null,null,"Sets or returns a value that determines if Node values can be edited by the user"]
[null,null,null,0,"Editing is allowed"]
[null,null,null,1,"Editing is not allowed"]
[null,null,null,"bAutoSort","[Optional = boolean]  Automatically sort siblings after manually entering an edited a node"]
[]
[null,null,null,"Remarks:","Double click or F2 to enter Edit mode, press Enter to apply the new text"]
[null,null,null,null,"If AutoSort is set, the Sort function's default order and compare methods are used"]
[]
[null,null,null,null,"EnableLabelEdit = True is equivalent to LabelEdit = 0"]
[null,null,null,null,"(LabelEdit is currently included for compatability with the VB6 treeview but it may be deprecated in future versions)"]
[]
[]
[null,"Property","LinesColor  [= long]"]
[null,null,null,"Sets or returns a color value for connector Lines"]
[]
[null,null,null,"Default:","vbScrollBars, the sytem scrollbars color"]
[]
[null,null,null,"Remarks:","The color is also applied to Expander borders if expander icons are not supplied."]
[null,null,null,null,"If the backcolor of Treeview's container frame is not white an appropriate LinesColor"]
[null,null,null,null,"may provide a more suitable contrast."]
[]
[null,null,null,"See also:","ShowLines"]
[]
[]
[null,"Sub","Move (cSource As clsNode, cDest As clsNode, Optional vBefore, Optional ByVal vAfter, Optional ByVal bShowError As Boolean)"]
[null,null,null,"Cuts and moves a Node with all its descendants to another node"]
[null,null,null,"cSource","the node to be moved"]
[null,null,null,"cDest","the node cSource will be moved to"]
[null,null,null,"[vBefore]","Numeric position in the Destination node's collection of ChildNodes the node will be placed before"]
[null,null,null,"[vAfter]","Numeric position in the Destination node's collection of ChildNodes the node will be placed after"]
[null,null,null,"[bShowError]","If true the procedure will display an error message"]
[null,null,null,null,"If false an error will be raised to the calling routine"]
[]
[null,null,null,"Remarks:","A Node cannot be moved to a child node or descendant"]
[null,null,null,null,"If an optional vBefore or vAfter is not supplied the node will be added as the last sibling"]
[null,null,null,null,"An error occurs if vBefore or vAfter are not valid, an index larger than current count of the destination's ChildNodes"]
[null,null,null,null,"See the Demo form how the method can be implmented with Ctrl-X, Ctrl-V"]
[null,null,null,null,"The Move method can be used to reorder siblings. You may need to loop  cDest.ChildNodes to "]
[null,null,null,null,"determine the index in the ChildNodes collection of a particular sibling cSource is to be moved before or after."]
[]
[]
[null,"Property","MoveCopyNode ( Optional bMove As boolean, Optional lColor As Long ) clsNode"]
[null,null,null,"Sets or returns a reference to a node stored for later move or copy, and highlighted "]
[null,null,null,"[bMove]","store an internal boolean that can be recalled to indicate if the node was marked for move or copy"]
[null,null,null,"[lColor]","RGB colour value to highlight the node flagged to be moved or copied"]
[null,null,null,null,"Default colours: amber if bMove = True,  green if bMove = False (copy)"]
[]
[null,null,null,"Remarks:","The MoveCopyNode will normally be cleared automatically but to explicitly clear it call Set MoveCopyNode = Nothing"]
[]
[null,null,null,null,"User's move or copy intention may be trapped by say key Ctrl-x/c, a right click context menu, or starting a drag/drop action"]
[null,null,null,null,"In the approriate event set the MoveCopyNode with appropriate properties (bMove and optionally a highlight colour)"]
[]
[null,null,null,null,"See the Demo form how to use this property in conjuction with Move and Copy methods"]
[]
[]
[null,"Property","Nodes [Collection of clsNode Objects]"]
[null,null,null,"Returns the collection of Nodes, clsNode objects"]
[]
[null,null,null,"Example","Set cNode = mcTree.Nodes(sKey)"]
[null,null,null,null,"For Each cNode in mcTree.Nodes"]
[null,null,null,null,"where mcTree refers to clsTreeView"]
[]
[null,null,null,"Remarks:","Do not use the collection's standard Add and Remove methods or the integrity of the  Treeview will be destroyed."]
[null,null,null,null,"Instead use node.AddChild or AddNode() and RemoveNode() methods"]
[]
[]
[null,"Function","NodeAdd (Optional vRelative, vOptional Relationship, Optional sKey As String, Optional sCaption As String, Optional vImageMain, Optional vImageExpanded) As clsNode"]
[null,null,null,"[vRelative]"," A node object or it's string Key or numeric index in the  tree's nodes collection"]
[null,null,null,"[vRelationship]","Specifies the relative placement of the Node object, as described in Settings. "]
[null,null,null,"[sKey]","A unique string that can be used to retrieve the Node with the Item"]
[null,null,null,"[sCaption]","The node's value that appears in the label"]
[null,null,null,"[vImageMain]","Key or index of the main icon"]
[null,null,null,"[vImageExpanded]","Key or index of an icon to be shown when expanded"]
[]
[null,null,null,"The ENUM values for Relationship are:"]
[null,null,null,"tvFirst",0,"First. The Node is placed before all other nodes at the same level of the node named in relative. "]
[null,null,null,"tvLast",1,"Last. The Node is placed after all other nodes at the same level of the node named in relative. Any Node added subsequently may be placed after one added as Last. "]
[null,null,null,"tvNext",2,"(Default) Next. The Node is placed after the node named in relative. "]
[null,null,null,"tvPrevious",3,"Previous. The Node is placed before the node named in relative. "]
[null,null,null,"tvChild",4,"Child. The new Node will be created as a child node of the node identified in vRelative. "]
[]
[null,null,null,"Remarks:","This NodeAdd method is provided for compatibility porting code from the VB6 treeview's \"Nodes.Add\" method."]
[null,null,null,null,"A notable difference with the vRelative argument is it can be can be assigned to a node object."]
[null,null,null,null,"For most purposes the Node.AddChild method is simpler and more efficient"]
[]
[]
[null,"Property","NodeHeight [=  single]"]
[null,null,null,"Determines the height between nodes, subject to a minimum default"]
[null,null,null,"Default: ","Autosized to the minimum of -"]
[null,null,null,null,"Font, or checkbox size, or icon size (if used)"]
[null,null,null,null,"The calculated minimum will be used if it is more than the value given to the NodeHeight  property"]
[]
[]
[null,"Sub","NodeRemove  (clsNode Object)"]
[null,null,null,"Removes the node and its child-nodes (if any) and all associated controls"]
[]
[]
[null,"Sub","NodesClear()"]
[null,null,null,"Removes all the Nodes and associated controls. "]
[null,null,null,"Two-way references between parent treeview class and node objects are cleanly destroyed with the internal call to TerminateTree"]
[null,null,null,"However all Treeview properties are retained for potential reuse"]
[]
[null,null,null,"See also:","TerminateTree"]
[]
[null,"Sub","PopulateTree()"]
[null,null,null,"This routine has been depricated and merged with Refresh in beta-023"]
[]
[null,"Sub","Refresh()"]
[null,null,null,"Creates node controls as required the first time respective parent's Expanded property = true"]
[null,null,null,"also hide/show and (re)position nodes as required."]
[null,null,null,"Call Refresh after:"]
[null,null,null,null,"- initialising the treeview's properties, adding the root-node(s) and branch nodes to display the treeview"]
[null,null,null,null,"- changing any Treeview properties while the treeview is already displayed"]
[null,null,null,null,"- adding, deleting, moving or copying any nodes"]
[]
[null,null,null,"Remarks:","Node controls are created on an \"as needs\" basis, that is when all the "]
[null,null,null,null,"node's parents are expanded and the node must be displayed for the first time."]
[]
[null,null,null,null,"Creating a large number of node controls including lines and possibly checkboxes can take a while."]
[null,null,null,null,"In a large tree consider setting Expanded properties as False for branches the user "]
[null,null,null,null,"does not need to see immediately.  When the user expands any nodes "]
[null,null,null,null,"its child-node controls will be automatically created."]
[]
[]
[null,"Property","RootButton [=  boolean]"]
[null,null,null,"Sets of retuns a value that determines if Root nodes have an Expander button"]
[null,null,null,"and if vertical lines are drawn between Root nodes"]
[]
[]
[null,"Property","RootNodes [ = Collection]"]
[null,null,null,"Returns a collection of Root nodes  (clsNode objects)"]
[]
[null,null,null,"Remarks:","The collection's Add & Remove methods should not be used."]
[null,null,null,null,"To add or remove a Root use AddRoot and NodeRemove methods"]
[null,null,null,null,"Root nodes are child-nodes of a special clsNode object (RootHolder) "]
[null,null,null,null,"whose sole function is to store the collection of Root nodes"]
[]
[]
[null,"Sub","ScrollToView(Optional cNode As clsNode, Optional Top1Bottom2 As Long, Optional bCollapseOthers As Boolean)"]
[null,null,null,"Scrolls the Treeview to place the node in view"]
[null,null,null,"[cNode]","The node to be positioned, by default the ActiveNode"]
[]
[null,null,null,"[Top1Bottom2]","1, places the active node at the top of the Treeview"]
[null,null,null,null,"2, places the active node at the bottom of the Treeview"]
[]
[null,null,null,null,"The following values only scroll the Treeview and reposition the node only if the node is not already visible"]
[null,null,null,null,"(Default)  0, scrolls to place the node roughly 1/3 from the top  the Treeview, but only if the node is not already visible"]
[null,null,null,null,"-1, places the active node at the top of the Treeview but only if it is not visible"]
[null,null,null,null,"-2, places the active node at the bottom of the Treeview but only if it is not visible"]
[]
[null,null,null,"[bCollapseOthers]","All nodes not in branches between the Root and node to be scrolled to, should be collapsed"]
[]
[null,null,null,"Remarks:","If the node is hidden behind a collpased parent, its parents will be Expanded to show the node"]
[null,null,null,null,"Call ScrollToView without arguments after setting a new ActiveNode to ensure it is placed in view"]
[]
[null,null,null,"See also:","ExpandToLevel() to collapse or expand the entire tree to a given level"]
[]
[]
[null,"Sub","SetScrollbars ( bRecalcWidths As Boolean, Optional bSetScrollDims as Boolean)"]
[null,null,null,"Reset the Treeview container Frame's scrollbars to ensure all nodes can be viewed."]
[]
[null,null,null,"bRecalcWidths","Examine all nodes to determine the maximum width required for a horizontal scrollbar."]
[]
[null,null,null,"[bSetScrollDims]","Reset the Frame control's ScrollWidth and ScrollHeight dimensions, this option is only intended for internal use."]
[]
[null,null,null,"Remarks:","Normally scrollbar settings are handled internally but may need to be reset in the following cases:"]
[null,null,null,null,"Call SetScrollbars(bRecalcWidths:=False) when resizing the Treeview, for example  in the Form's Resize event"]
[null,null,null,null,"Call SetScrollbars(bRecalcWidths:=True) after changing or updating text in one or more Node Captions while the Treeview is running"]
[]
[]
[null,"Property","ShowExpanders [=  boolean]"]
[null,null,null,"Sets or returns a value that determines if the Treeview shows +/- expand/collapse buttons are shown"]
[null,null,null,"Default: ","True"]
[]
[null,null,null,"See also:","ExpanderImage(),  to pre-load images for expander icons"]
[]
[]
[null,"Property","ShowLines [=  boolean]"]
[null,null,null,"Sets or returns a value that determines if the Treeview shows horizontal leader lines and vertical lines"]
[null,null,null,"Default: ","True"]
[]
[null,null,null,"Remarks:","A large treeview may be created and display significantly faster if lines are not displayed"]
[]
[null,null,null,"See also:","LinesColor"]
[]
[]
[null,"Sub","TerminateTree"]
[null,null,null,"Cleanly tear down the two way references between the parent treeview class and all child node classes"]
[]
[null,null,null,"Example","If Not mcTree Is Nothing Then"]
[null,null,null,null,"    mcTree.TerminateTree"]
[null,null,null,null,"End If"]
[]
[null,null,null,"Remarks","It is  important to call TerminateTree before the last reference to cslTreeClass is released "]
[null,null,null,null,"to avoid circular references with the the node classes."]
[null,null,null,null,"Typically call TerminateTree in the form's QueryClose event or Terminate event."]
[]
[null,null,null,"See Also:","NodesClear"]

{"sheet":"clsNode","index":3,"n_rows":149,"n_cols":19,"rows_kept":149,"cut":false,"hidden":false,"merged":[]}
["clsNode",null,"Public Properties, Subs and Functions"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"list for the dropdown"]
[null,"Function ","AddChild(Optional sKey As String, Optional sCaption As String, Optional vImageMain, Optional vImageExpanded) As clsNode",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Func   AddChild"]
[null,null,null,"Adds a new child node",null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   BackColor"]
[null,null,null,"[sKey = string]","The node's Key in the main nodes collection ",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Bold"]
[null,null,null,"[sCaption = string","The node's value",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Caption"]
[null,null,null,"[vImageMain]","Key or index of the main icon",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Checked"]
[null,null,null,"[vImageExpanded]","Key or index of an icon to be shown when expanded",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Child"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   ChildNodes"]
[null,null,null,"Remarks:","The new node will only display after calling PopulateTree or Refresh ",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   ControlTipText"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Expanded"]
[null,null,null,"See also:","TreeView.Images()  if using icons",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   FirstSibling"]
[null,null,null,null,"Treeview.AddNode(), which includes Realtive and Relationship options",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   ForeColor"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   ImageExpanded"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   ImageMain"]
[null,"Property","BackColor [= long]",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Sub    ImageUpdate"]
[null,null,null,"Returns or sets the backcolor of the node label",null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Key"]
[null,null,null,"Default:","Inherited from the frame container's backcolor",null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   LastSibling"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   NextNode"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   ParentNode"]
[null,"Property","Bold [= boolean]",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Previous"]
[null,null,null,"Returns or sets Bold for the node's caption",null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Root"]
[null,null,null,"Default:","False",null,null,null,null,null,null,null,null,null,null,null,null,null,"Func   Sort"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"Prop   Tag"]
[]
[null,"Property","Caption [= variant]"]
[null,null,null,"Returns or sets the value displayed in the node label's caption"]
[]
[null,null,null,"Remarks:","If updating or changing a previously applied Caption or Captions it may be useful to "]
[null,null,null,null,"reset scrollbars with TreeView.SetScrollbars(bRecalcWidths:=True)"]
[]
[]
[null,"Property","Checked [= variant]"]
[null,null,null,"Returns or sets a value between -1 to +1 that determines the checked state"]
[null,null,null,"Default","  0   not ticked"]
[null,null,null,null," -1   ticked"]
[null,null,null,null,"+1   tick greyed, mixed state  (if TriState is enabled)"]
[]
[null,null,null,"Remarks:","If the  variant is written as a Boolean Checked will coerce to -1 or 0"]
[null,null,null,null,"If the  variant is written as Null, Checked will be set as  +1 "]
[null,null,null,null,"If TriState is enabled before any Checked values are written "]
[null,null,null,null,"an attempt is made to set parent nodes' tristate values appropriately and set descendants' values"]
[null,null,null,null,"In a large tree it may be more efficient to carefully write any non zero Checked values before setting the clsTreeView.Checkboxes property"]
[null,null,null,null,"If returning the Checked property to a boolean note that +1 (mixed) will coerce to True"]
[]
[null,null,null,"See also:","clsTreeView.Checkboxes and clsTreeView.CheckboxImage"]
[]
[]
[null,"Property","Child [= clsNode Object]"]
[null,null,null,"Returns a reference to the first child of a clsNode object "]
[]
[]
[null,"Property","ChildNodes [= Collection of clsNode]"]
[null,null,null,"Returns a Collection of the Node object's child node objects"]
[]
[null,null,null,"Remarks:","Although the Set property is visible externally this is only designed for internal use"]
[]
[null,"Property","ControlTipText [= String]"]
[null,null,null,"Returns or sets text displayed in the node label's ControlTipText property, "]
[null,null,null,"the text that appears when user briefly hovers the mouse over the node label."]
[]
[]
[null,"Property","Expanded [=boolean]"]
[null,null,null,"Returns or set a value that determines if the Node will apear expanded or collapsed"]
[null,null,null,"Default:","True, expanded"]
[]
[null,null,null,"Remarks:","If changing Expanded while the tree is running also call Refresh"]
[]
[]
[null,"Property","FirstSibling [ = clsNode Object]"]
[null,null,null,"Returns the first sibling of the node "]
[]
[]
[null,"Property","ForeColor [= long]"]
[null,null,null,"Returns or sets the node caption's font color"]
[null,null,null,"Default:","Inherited from the frame container's forecolor"]
[]
[]
[null,"Property","ImageMain [vImageMain]"]
[null,null,null,"Sets or returns a numeric index or string key that identifies the node's main icon in the TreeView's Images collection"]
[]
[null,null,null,"Remarks:","The specified image must be added to Images collection with TreeView.Images or Treeview.ImageAdd"]
[]
[]
[null,"Property","ImageExpanded  [vImageExpanded]"]
[null,null,null,"Sets or returns a numeric index or string key that identifies an alternate icon in the Images collection if the node is expanded "]
[]
[null,null,null,"Remarks:","If an expanded icon is not associated the main image will be used at all times."]
[]
[]
[null,"Sub","ImageUpdate ()"]
[null,null,null,"Updates the Icon if a new icon has been applied with with ImageMain or ImageExpanded while the Treeview is running"]
[]
[null,null,null,"Remarks:","While the treeview is running a new icon can be added with TreeView.AddImage, associated with the  "]
[null,null,null,null,"node with ImageMain or ImageExpanded, then forced to display with ImageUpdate"]
[]
[null,null,null,"See also","Treeview.ImageAdd, Treeview.Images"]
[]
[]
[null,"Property"," LastSibling  [ = clsNode Object ]"]
[null,null,null,"Returns a reference to the last sibling of the node "]
[]
[]
[null,"Property","Key [= string]"]
[null,null,null,"Returns or sets the Key for the Tree's Collection of nodes"]
[]
[null,null,null,"Remarks:","Use of a Key is optional."]
[null,null,null,null,"The Key can be updated while the Treeview is running"]
[null,null,null,null,"If the node is copied the Key (if any) will be appended with \"_copy:#\""]
[]
[]
[null,"Property","NextNode [ = clsNode Object ]"]
[null,null,null,"Returns a reference to the next sibling of the node"]
[]
[]
[null,"Property","ParentNode [ = clsNode Object ]"]
[null,null,null,"Returns a reference to the node's parent"]
[]
[null,null,null,"Remarks:","To change the node's parent use the Move method"]
[]
[]
[null,"Property","Previous [ = clsNode Object ]"]
[null,null,null,"Returns a reference to the previous sibling of the node"]
[]
[]
[null,"Property","Root [ = clsNode Object ]"]
[null,null,null,"Returns a reference to the Root node, of which all other nodes are children or grandchildren"]
[]
[null,null,null,"Remarks:","The treeview can contain multiple Root nodes"]
[]
[]
[null,"Function","Sort (Optional ByVal ndOrder As ndSortOrder = ndAscending, Optional ByVal ndCompare As ndCompareMethod = ndTextCompare) As Boolean"]
[null,null,null,"Sorts the node's child-nodes"]
[null,null,null,"Returns True if sorting  changed the original order and to flag Refresh should be called"]
[null,null,null,"[ndOrder]","(Default)  ndAscending(1), sort in ascending order"]
[null,null,null,null,"ndDescending(2), sort in descending order"]
[null,null,null,"[ndCompare]","(Default) ndTextCompare(1),  eg A=a, a before B"]
[null,null,null,null,"ndBinaryCompare(0),  eg B before a"]
[]
[null,null,null,"Remarks:","Call Sort after completing adding, moving or copying nodes to re-sort the collection"]
[null,null,null,null,"If only changing Node captions (values) trap the Sort function's return value, if True call Refresh to update the Treeview"]
[]
[null,null,null,"See also","Treeview.LabelEdit( bAutoSort )"]
[]
[]
[null,"Property","Tag [= variant]"]
[null,null,null,"Sets or returns a tag value"]
[]
[null,null,null,"Remarks:","As a variant the Tag can contain an arrray of values"]

{"sheet":"Versions","index":4,"n_rows":461,"n_cols":10,"rows_kept":461,"cut":false,"hidden":false,"merged":[]}
[]
[]
["TreeView 006 PT1.xlsm"]
[null,"various Set Nothing commented, see ' PT redundant"]
[]
[null,"Counters in Init/Terminate events, counts debugged when done, see ClassCounts(), remove all this after testing"]
[]
[null,"All the Treeview labels are now created once only"]
[null,"(previously they were deleted and recreated when user did collapse/expand )"]
[null,"this makes update much faster if there are 100s of nodes"]
[null,"PopulateTree() & AddChildNodes() significantly rewritten"]
[null,"To test, add a big number to the cNode.AddChild loop in the Initialize in the form"]
[]
[null,"ToDo","This has messed up NextVisibleNodeInTree(),    fixed  19-01-2013"]
[]
[null,"ToDo","After mouse click to expand/collapse the main root node gets selected. Fixed 19-01-2013"]
[]
[null,"Peter Thornton",null,"2013-01-18"]
[]
["TreeView 006 PT1c.xlsm (not uploaded to JKP's Skydrive)"]
[]
[null,"Fixed","NextVisibleNodeInTree(),  Loop nodes until got a visible node, and not hidden because collapsed, see PT comment in the Proc'"]
[null,null," new Node.Index & Node.VisIndex properties to track created order and displayed order of nodes"]
[null,null,"1st fix was to loop controls up or down to find the next Visible one. But, controls can get added in a different order to the visible order (eg intitally collapsed, or added later during the session)"]
[null,null,"2nd fix uses the Index pairs, NextVisibleNodeInTree() is rewritten and simplfied"]
[]
[null,"Fixed","\"After mouse click to exand/collapes…\" see PT comment in Sub NodeClick()"]
[]
[null,"msMaxTop added to track the lowest control, needed to set the vertical scrollbars and scroll height"]
[]
[null,"Checkboxes added"]
[null,null,"Just a single label, Marlett font for the Tick"]
[null,null,"They don't look quite right, maybe better to use 2 labels like the expander buttons ?"]
[null,null,"Checkboxes handled in clsEvent, but probably better in clsNode"]
[]
[null,"Key Up/Down  moved to new TreeControl KeyDown event trapped, to allow continuous key press "]
[null,"Key Enter toggles collapse/expand"]
[null,"Key Space toggles Checked"]
[null,"Key PageUp/PageDown and End/Home activate bottom or top visible node"]
[]
[null,"Horizontal lines lowered by 2.25 to line up better"]
[]
[null,"Peter Thornton",null,"2013-01-19"]
[]
["TreeView 006 PT2.xlsm"]
[null,"Standard Treeview added to the Demo form to compare old & new side by side "]
[]
[null,"EditLabels","nodes can be manually editied."]
[null,null," Select a node then click again to activate edit Textbox, Enter or Esc when done"]
[null,null,"Behaviour is slightly different in the std-treeview, after 2nd it click wait 0.5 sec's, then only if the mouse is still over the node is editmode entered"]
[null,null,"EditLabels property added,  like TreeView.EditLabels, set with tvwAutomatic/tvwManual"]
[null,null,"EditLabels is handled in clsEvents, but would be easier to control from TreeControl if in clsNode"]
[]
[null,"todo","If long text is entered and too wide, the node label height increases, not good"]
[null,null,"Maybe include key F2 to enter editmode ?     Added 23-01-2013"]
[null,"?","The 2 click method partially replicates the std-treeview, but maybe double-click is better"]
[]
[null,"NodesClear method added, like TreeView.Nodes.Clear "]
[]
[null,"?","Is  clsEvents needed, or could all the events be handled in clsNodes, ",null,null,null,null,null,null,"JKP: I considered this. We could add all relevant controls belonging to a node to the clsNode class. "]
[null,null,"or maybe only one clsEvents for all events associated with a single node",null,null,null,null,null,null,"If we define them WithEvents we can indeed easily trap their events."]
[]
[null,"Peter Thornton",null,"2013-01-21"]
[]
["Treeview 007"]
[]
[null,"Moved controls a bit so the treeview looks more like the Windows version"]
[null,"Removed Key argument to add nodes. When you instantiate a new clsNode, it creates is't own GUID as a key"]
[null,"Changed logic of checkboxes button on the form"]
[null,"Fixed bug regarding starting the treeview without checkboxes and adding them later on"]
[null,"Added a Nodes collection to the tree so the calling userform can use them."]
[null,"Applied naming convention for singles: 'sng'"]
[]
[null,"JKP 22-01-2013"]
[]
["Treeview 008","Put key arguments back in place."]
[null,"Added Mac compile condition to disable API's on MAC"]
[null,"Added 0 number key to collapse to root"]
[null,"Added check (and error raise) for duplicate keys"]
[null,"Removed clsEvent class and moved the relevant code to clsNode"]
[]
[null,"JKP 23-01-2013"]
[]
["Treeview 008 PT1"]
[null,"Completed EditLabel stuff after moving from clsEvent to clsNode"]
[null,"Reinstated Checkboxes added only if/as required, fixed the bug (see above) a different way. Now it's OK to do 'CheckBoxes = True' anytime"]
[null,"Added key F2 & right/context key to enter EditMode"]
[]
[null,"Peter Thornton 23-01-2013"]
[]
["Treeview 009"]
[null,"Use a frame added at design time for the treeview"]
[]
[null,"JKP 23-01-2013"]
[]
["Treeview 009 PT1"]
[null,"Changed enter Edit Mode from 2nd click after already active to double-click"]
[null,"(this is not the same behaviour as the original but more like other things in Excel)"]
[null,"todo"," if long text is entered via the editbox might need to increase scroll width"]
[null,"Added Icons, up to 2 per node for expand/collapse"]
[]
[null,"Peter Thornton 23-01-2013"]
[]
["Treeview 009 PT2"]
[null,"added  Raise event \"NodeCheck\" to trap user checked change in the form"]
[null,"minor change, Check property now handles the tick"]
[null,"added Node properties, ",null,"read/write: Backcolor, Forecolor, Bold,"]
[null,null,null,"read only:   FirstSibling, LastSibling, Visible"]
[]
[null,null,"maybe change these property names as the original Treeview ?"]
[null,null,null,"Caption > Text,   ActiveNode > Selected,  ParentNode > Parent"]
[]
[null,"Peter Thornton 23-01-2013"]
[]
["Treeview 010","Polished things a bit, made sure both forms are (almost) identical reg. code"]
[]
["Treeview 010 PT1"]
[null,"GetChild, sKey changed to vKey, can now get Child by index"]
[null,"fixed FirstSibling, LastSibling to return what they are supposed to instead of first & last child"]
[null,"changed GetChild() to use string key or numeric index"]
[null,"added Indentation"]
[null,"added RootButton (equivalent to LineStyle in the original)"]
[null,"added AfterLabelUpdate event"]
[null,"Re-worked Expand/collapse, see proc UpdateExpand()"]
[null,"Re-worked Icons. A collection of images handles is added to the tree, nodes given  image keys only (string or numeric index)"]
[null,"Re-worked getting max-width for horizontal ScrollWidth, see Function getMaxRight() and msngMaxWidths(0 To 10) "]
[null,"added automatic NodeHeight, parent frame's font can be changed and NodeHeight will adjust for larger fonts"]
[null,"added controls to the demo forms for testing "]
[]
[null,"Peter Thornton 28-01-2013"]
[]
["Treeview 011","Fixed code indenting"]
[null,"Moved plus/minus in expanders a bit to the right."]
[]
[]
["Treeview 012-PT1"]
[null,"Property Set Images() for icons can accept a collection or a container of image controls, eg a Frame"]
[null,"added variables as vertical offsets from node tops for all node objects"]
[null,"added 'DoubleDemo' form, single form to show w/out icons as an idea for published demo"]
[]
[null,"Peter Thornton 29-01-2013"]
[]
["Treeview 012-PT3"]
[null,"Removed and tidied up some old code"]
[null,"Removed and added some comments"]
[null,"Vertical lines are now single lines, reduces number of controls on the treeview and decreases startup time with many nodes"]
[null,"Added NodeRemove. Removes node & any children, associated controls, tears down class ref's"]
[]
[null,"Peter Thornton 30-01-2013"]
[]
["Treeview 012-PT4"]
[null,"Cleaned up more code"]
[null,"Horizontal scroll width to automatically increase after manual edit  if required"]
[null,"with NodeRemove re-scroll to previous above node when done"]
[null,"fixed bug with the new vertical line method"]
[null,"fixed bug with NodeRemove if last child is being removed to delete relevant parent controls (V-line & expanders)"]
[null,"fixed a bug I introduced with how +/- are changed in the expander"]
[null,"Removed the optional bInit from PopulateTree"]
[null,null,"todo - abort this routine if Root Is Nothing (?)"]
[null,"added \"Data Dump\" button on the form, example to retrieve and dump the node values to a sheet"]
[null,"for stress testing the number of nodes to be added can be changed via a textbox on the demo form"]
[null,"After PopulateTree details written to Form caption (to be removed)"]
[null,"ToDo, redesign the demo form!"]
[]
[null,"Peter Thornton 31-01-2013"]
[]
["Treeview 013","Removed common controls tree control"]
[null,"Removed all forms but the ufDoubleDemo"]
[null,"Tidied up the form a bit, added copyright notice"]
[]
["Treeview 013_PT2"]
[null,"Re-worked AddChildNodes(), replaced with new BuildTree() & NodeControls() to cater for nodes added during runtime ",null,"all node controls3"]
[null,"Catered to AddChild at runtime"]
[null,"Catered to AddSibling at runtime"]
[null,"Added FullWidth, if false don't use image controls for icons but add icon to label, reduces controls and faster but can't highlight full width"]
[null,"Checkbox repositioned to left of icon"]
[null,"Todo","look at Set ActiveNode, what if it's not visible, implement better scrollTop adjustment (make use of .VisIndex)"]
[null,null,"KeyUp fails if CapsLock is on"]
[null,null,"cursor xlWait  see 013-PT5"]
[]
[null,"Peter Thornton 01-02-2013"]
[]
["Treeview 013-PT3"]
[null,"fixed bug, new ChildNodes added during run time were added to the main collection twice"]
[null,"now childnode added only once  with its key, .Tree.Nodes.Add cChild, sKey  (but changed next version)"]
[null,"UniqueKey test not longer required, ?"]
[]
[]
["Treeview 013-PT4"]
["","Change Key method:"]
[null,null,"Key only needs to be unique for the parent's collection"]
[null,null,"full-path type key generated for the main key"]
[null,null,"if no key is supplied a key is auto-generated with a simple counter"]
[null,"All node controls are now permanently referenced in clsNode, refresh is much faster"]
[null,"Todo","Set ActiveNode should only be for external use and set scrollTop to place in view, ?"]
[null,null,"For internal use (eg keyDown, after deleting an activenode), set moActiveNode and set ScrollTop as required"]
[null,null,"Sort Procs for public use, and  mark Public's that are only intended for internal use, eg prefix with an \"x\""]
[null,null,null,null,null,null,null," "]
[null,"Peter Thornton 02-02-2013"]
[]
["Treeview 013-PT5"]
[null,"Added Move Node and its children to another Node Ctrl-X/V  MoveOrCopy & MoveCopyNode"]
[null,"app.Cursor xlWait, if bInit and 300+ nodes to build for first time. In a normal refresh resetting the cursor causes an unnecessary blink"]
[]
[null,"Peter Thornton 03-02-2013"]
[]
["Treeview 013-PT12"]
["-","Summary of changes since 013-PT5"]
["-","Set ActiveNode() now only restores and reapplys highlight colours"]
["-","Added Sub ScrollToView to give better control if/when scroll should occur"]
["-","Changed logic of keyLeft. If the activenode is collapsed or has no children keyLeft will acivate the parent"]
["-","PageUp/Down with key held down now works nicely, only activates after release and to same relative visual location."]
[null,null," But Up/Down doesn't work well in a large tree. Todo, need to look at this"]
["-","Added Move node + child nodes"]
["-","Added Copy node + child nodes"]
["-","Added MoveCopyNode() "]
["-","Demo form shows how to trap Ctrl-x, Ctrl-c & Ctrl-V to move/copy (similar for mouse action)"]
["-","Added ShowLines to optionally use lines. No lines reduces controls by up to nearly 50%,considerably reduces startup time of a large tree"]
["-","All Expander stuff is now in the clsNode"]
["-","Renamed original PoulateTree > BuildRoot"]
["-","Renamed AddChildNodes > BuildTree"]
["-","Reworked and split BuildTree into two recursive routines, BuildTree and BuildNodeControls"]
["-","added PoulateTree to call BuildRoot first time with bInit and Refresh to update"]
["-","All node controls remain fully referenced. Refresh (say after expand) is now very fast even in a large tree"]
["-","Added Expander icons, optionally use images instead of +/- characters"]
["-","Node label default colours now remain as adopted from the frame container (was vbWindowBackground/Text)"]
["-","Added Sort. Currently Sort is at node level only",null,"Public Properties"]
["-","Implemented call Sort after manual edit, this should be configurable?",null,"Public Subs and Functions"]
["-","Reworked quite a lot of code, fixed several small bugs, ",null,"Friend Properties, Subs & functions   * ideally these should be Private, but the classes need to talk to each other, use of 'Friend' just indicate the difference"]
["-","Removed and Added comments",null,"Private Properties, subs, functions & events"]
["-","Sorted Procedures:"]
["-"]
["-",null,"currently d&d is  buggy, and should NOT be distributed even for beta testing!"]
["-"]
["-","Started documentation, a listing of the public procedures with brief details of purpose, arguments & remarks"]
["-","Started Drag & Drop just for ideas. Press Ctrl or Shift, then drag to move or copy."]
[]
[null,"Peter Thornton 11-02-2013"]
[]
["Treeview 013-PT13"]
[null,"Drag & drop removed"]
[null,"Previous dual keys for main and childnodes collections changed, "]
[null,null,"now only single key for the main collection and it is optional"]
[null,"Key can be changed during runtime"]
[null,"Added NodeAdd(), similar to the old treeview's, to allow easy porting of code"]
[null,"Removed Expanded argument from AddRoot and AddChild, all arguments are optional consistent with the old treeview"]
[null,"Fixed bug relating RemoveNode() that could lead to classes not getting termintated"]
[null,"This version includes a button to load a tree and test the new NodeAdd(), it should be removed before publication"]
[null,"Added Demo sheet information, more documentation"]
[null,"Todo","(not a bug) If a collapsed branch of nodes is \"movced\" to a different level,"]
[null,null,"when expanded horizontal alighments will not update until a full refresh (mbInDesign) is done"]
[]
[]
[null,"Peter Thornton 15-02-2013"]
[]
["Treeview 013-PT14"]
[null,"Adpated to use multiple root nodes"]
[null,"many internal changes"]
[]
[null,"Peter Thornton 17-02-2013"]
[]
["Treeview 014"]
[null,"Removed checkbox for mouse scroll and all associated code"]
[null,"Removed second demo button"]
[null,"Tidied up a bit: "]
[null,null,"Indented my way :-)"]
[null,null,"added/removed blank lines between subs"]
[null,null,"Ran code cleaner"]
[null,null,"Removed/commented out unused variables"]
[null,"Gave Root's parentnode instance a Caption of 'RootHolder' in order to make the Add sibling button work"]
[null,"to add new roots."]
[null,null,"                                                                                                                                                                                                                                                                                                                                                                     "]
[null,"JKP 18-02-2013"]
[]
["Treeview 014-PT01"]
[null,"fixed various small bugs"]
[null,"main headers"]
[null,"comments in the demo forms"]
[null,"Replaced VisibleNodes with NodeIsVisible (not just renamed)"]
[null,"Small change with logic PageUp/Down calc"]
[null,"Home/End activate first or last visible node"]
[null,"Reworked BuildTree"]
[null,"Removed CreatedButton & Created properties (no longer needed, all controls fully ref'd so check Is Nothing)"]
[null,"added ShowExpanders property  (it's the one of the VB6 TV's Style options)"]
[]
[null,"Peter Thornton 19-02-2013"]
[]
["Treeview 014-PT02"]
[null,"after add/remove fixed to ensure normal/expanded icon is consitent if expanded state"]
[null,"All controls are added with visible:=false, significantly reduces start-up time"]
[null,"Peter Thornton 19-02-2013"]
[]
["Treeview 015-PT01"]
[null,"Correction, now all controls are added with name:=\"short-name\", visible:=false, significantly reduces start-up time, as before but for the right reason!"]
[null,"removed some comments"]
[null,"fixed bug with ActivateNode if the node's parent was displayed collapsed and the node.control not yet created"]
[null,"ScrollToView will now expand node's parents if necessary to display it"]
[null,"Small change with logic of keyRight. If expanded will select the first child node"]
[null,"Small change with logic of KeyDown. If the the activenode is last node and collapsed, expand and activate the 1st childnode"]
[null,"Added Public ExpandToLevel() with Root level considered as level 0, calls SetTreeExpansionLevel with (level-1)"]
[null,"and made SetTreeExpansionLevel private to keep its recursive arguments hidden"]
[null," SetTreeExpansionLevel() treats the Root level as level - 1, ?"]
[]
[null,"Peter Thornton 21-02-2013"]
[]
["Treeview 016"]
[null,"removed ActivateNode(), NodeParentHasMoreSiblings(), UniqueKey(), EditNode()"]
[null,"removed some fully commented routines incl the original AddChild & RemoveChild, since rewritten"]
[]
[null,"Peter Thornton 21-02-2013"]
[]
["Treeview 017"]
[null,"Documentation, corrections and updates"]
[null,"Bug  behind the \"Dump Data\" button fixed, includes commented code behind the button to dump visible nodes only"]
[null,"Added Checkbox icons"]
[null,"checkbox options on the demo form rearranged"]
[null,"a small button to cover the SortTest checkbox at runtime, it also calls the sort test routine"]
[null,"Key left/right moved from keyup to keydown"]
[null,"Key - delete node added to demo"]
[null,"Removed reference to Extensibility"]
[null,"lblAbout slightly rewritten"]
[]
[null,"Peter Thornton 27-02-2013"]
[]
["Treeview 018","Updated some texts"]
[null,"Moved images in Image frame and moved the image frame outside the "]
[null,"viewable area of the userform"]
[null,"Fixed checkboxes bug."]
[]
[null,"JKP 28-02-2013"]
[]
["Treeview 019"]
[null,"To Fix Mac problem removed masked/transparent colours form all icons, replaced transparent colour with white"]
[null,"Also reduced colour depth in some to ensure all images are 16 or 256 or colours, 4 or 8 bit "]
[null,"(thanks \"Michael\" and Ron de Bruin)"]
[null,"However it means Window users who want to change the treeview's background from white may not like the new icons!"]
[null,"The TreeControl reference is no longer cleared in the TerminateTree routine, also called by NodesClear"]
[null,"This means an existing treeclass can be reused with existing properties, simply add a new set of nodes."]
[]
[null,"Peter Thornton  04-03-2013"]
[]
["Treeview 020"]
[null,"fixed bug in Let showLines that had been introduced in 019"]
[null,"fixed EditBox textbox being unnecessarily recreated instead of reused"]
[null,"scroll width computation revised"]
[null,"demo form resized by 4/3 if running in Mac and with larger fonts"]
[null,"dual constants added to attempt the make the treeview size and appear similar in Mac, search \"#If Mac Then\""]
[null,"added TriState for checkboxes,  details in the documentation"]
[]
[null,"Peter Thornton  09-03-2013"]
[]
["Notes for Mac users: "]
[null,"The main things that have been added or changed to enable this demo to work and display reasonably in Mac:"]
[null,"-","The demo form and controls resize by a factor of 96/72 points with the objective of making the pixels size for each object similar in Windows and Mac"]
[null,"-","Font sizes increase by approximately the same factor but in integer values"]
[null,"-","All Icon images have colour depth of 16 or 256 colour, 4 or 8 bit"]
[null,null,"\"Transparent\" or masked colours in icon images have been removed "]
[null,null,"( not ideal for Window users who might want to change the treeview's background to a non white colour)"]
[null,null,"The original images, with transparent colours and higher colour depth, were responsible for previous versions failing to load in Mac, worth noting!"]
[null,"-","Icons bundled on the demo form  were designed for Windows as 12x12 points to appear as 16x16 pixels, they appear smaller when viewed in Mac as 12x12 pixels"]
[null,null,"Icons for expander buttons and checkboxes will also appear smaller in Mac"]
[null,"-","In clsTreeView constants are given different values under the compile constant #If Mac Then…#Else ' windows #EndIf"]
[null,null,"These constants are used in positioning the various controls that are created for the nodes"]
[]
[null,"Some node controls do not size or position as well as they do in Windows, further tweaking and refinement is still required."]
[null,"Care has been given to ensure all dimensions are calculated in units of 0.75 points for use in Windows and integer points for use in Mac"]
[null,"It is important any dimensional changes are only related to calculations that occur while running in Mac if integrity is to be maintained if sharing with Windows users"]
[null,"PT  09-03-2013"]
[]
["Treeview 021"]
[null,"added bCollapseOthers option to ScrollToView(), to collapse all unrequired branches",null,null,null,null,null,null,null,"[did not get added in 021 but in 022]"]
[null,"fixed bug attemping to collapse a root node that has no child nodes"]
[]
[null,"Peter Thornton  14-03-2013"]
[]
["Treeview 022"]
[null,"fixed bug collapsing a root with left arrow if multiple roots exist"]
[null,"code changes -"]
[null,null,"If ActiveNode.ParentNode.Level >= 0 Then"]
[null,null,"NodeRemove, added  If mlNodesCreated Then"]
[null,null,"PopulateTree,  On Error GoTo errExit moved to top"]
[null,null,"various error handlers amended"]
[null,null,"node controls given unique names, to avoid potential bug if image controls are used which do not have a tabindex property"]
[null,"changed node's Caption property from String to Variant to avoid mismatch errors with non strings"]
[null,"added EnterExit(bExit) to be called by the tree container's Enter/Exit events in the form"]
[null,"added bInactive arg to SetActiveNodeColors, triggers different highlight colours if the tree gains/loses focus"]
[null,"added EnableLabelEdit() as more logical alternative to  LabelEdit()"]
[null,"added navigation controls to the documentation sheets"]
[null,"corrected and added to the documentation"]
[]
[null,"Peter Thornton  01-04-2013"]
[]
["Treeview 023"]
[null,"Changed behaviour after expanding a node to ensure the active node remains visible (thanks Alex for suggesting)"]
[null,"Also, if all newly expanded child-nodes are not in view, the active-node will re-positioned "]
[null,"such that its last child node is positioned at the bottom. However if the treeview's height is insufficient "]
[null,"to display all the child nodes, the active node will be placed at the top of the treeview."]
[]
[null,"The routine \"PopulateTree\" has been depricated and merged with \"Refresh\" (see Refresh in the clsTreeView documentation sheet)"]
[]
[null,"When the Treeview is created the first root node is made the active-node but it is not highlighted by default until focus moves to the Treeview"]
[null,"In the demo form, after creating the treeview  - Me.frmDemo.SetFocus moves focus to the treeview, the \"Enter\" event highlights the activenode."]
[]
[null,"Node mouse click behaviour changed: "]
[null,"In the MouseDown event the node is temporarily activated and  highlighted, also the previous activenode is outlined"]
[null," If user drags the mouse off the node before releasing the previous activenode is restored (the Click event does not fire),"]
[null,"otherwise the new activenode is confirmed in the Click event"]
[]
[null,"Peter Thornton  15-04-2013"]
[]
["Treeview 024"]
[null,"Changes to behaviour how the ActiveNode is highlighted on mouse-down, and mouse-up"]
[null,"If the Treeview has or (re)gains focus the active-node is highighted with a the system highlight colours"]
[null,"If the Treeview does not have or loses focus the active-node is highlighted with a grey border"]
[null,"The NodesClear function now also clears any scroll bars"]
[null,"Several changes to ensure the clsTreeview & clsNode are fully compatible for use in Excel, Word and Access"]
[null,"If used in Access or Word the this compile constant should be included at the top of clsTreeView"]
[null,null,"#Const HostProject = \"Access\"  or \"Word\"   (default is Excel)"]
[]
[null,"Peter Thornton  28-04-2013"]
[]
["Treeview 025"]
[null,"Fixed bug that failed to show checked state in Root-nodes' Checkboxes that had been applied as ticked before building the treeview"]
[null,"Prevent scrollLeft updating when manually changing a checkbox to a node with text wider than the frame"]
[null,"Added ControlTipText property to Node labels"]
[]
[null,"Peter Thornton  25-09-2013"]
[]
[]
["Treeview 026"]
[null,"Added Property Treeview.LinesColor, allows optional colour for the connector Lines (if shown)."]
[null,"Added Public Sub TreeView.SetScrollbars: "]
[null,"   - Can be called from a form's resize event while resizing the Treeview's "]
[null,"     container Frame to re-set scrollbars to the new frame size. Thanks Kevin Jones MVP for the suggestion."]
[null,"  - Can also be called to adjust scrollbars after changing or updating Node Captions while the Treeview is running "]
[null,"    to cater for potential change in maximum internal text width."]
[null,"Added Public Sub Treeview.ImageAdd:  Icons can be added to the Images collection individually before or after the Treeview has been created. "]
[null,"Added Public Sub Node.ImageUpdate: New Node icons can be associated and displayed while the Treeview is running."]
[null,"Added a second option bMultiLine for EnableLabelEdit."]
[null,"See new documentation for the routines in bold above."]
[]
[null,"With tri-State checkboxes:  when a single checked value is changed the NodeCheck events are now triggered for all dependent parent and child checkboxes"]
[null,"   if their values change. Previously the NodeCheck event was only raised for the directly changed Checkbox. Thanks Kevin Jones MVP for the suggestion."]
[null,"With tri-State checkboxes:  added code that ensures newly added Nodes get their checked value updated if the parent's Checked=True "]
[null,"With tri-State checkboxes: if unchecked Nodes are copied or moved to a checked parent, the moved or copied Nodes will change to checked. As previously, "]
[null,"  if the Copied Nodes are checked, the new Parent will change to checked if it was not already."]
[]
[null,"In Edit mode the Editbox resizes and repositions to maintain long edited text fully visible while editing."]
[null,"Removed  TreeControl.SpecialEffect = fmSpecialEffectSunken in BuildRoot. Thanks Nicolas Durussel for the suggestion"]
[null,"Replaced Sub clsTreeview.NodeClick() with Sub NodeEventRouter()"]
[null,"RemoveChild: added bReverse option for use when called by Move and vBefore is included"]
[null,"Fixed a bug with Node.Previous"]
[null,"Added Font.Charsett=2 if Labels as simulated checkboxes are used to ensure the Marlett checkbox tick works in pre Office 2007 versions. Thanks Jerzy Orysiak for the suggestion."]
[null,"Fully removed PopulateTree which was deprecated in v023"]
[null,"Added commented code to handle Mouse DblClick, Down, Move and Up events all routed to the same Event \"MouseAction\". See the note in NodeEventRouter"]
[null,"to find which lines to uncomment in both modules."]
[]
[null,"Peter Thornton  12-03-2015"]
[]
[null,"Minor changes to clsTreeview.ImageAdd(), clsTreeview.GetNodeIcon() and clsNode.ImageUpdate()"]
[null,"Peter Thornton  15-10-2015"]

{"sheet":"VB6 Treeview Methods","index":5,"n_rows":95,"n_cols":8,"rows_kept":95,"cut":false,"hidden":false,"merged":[]}
["msComctl.ocx, MSComctlLib, Microsoft Windows Common Controls 6.0 (SP6)"]
[]
[]
[null,"f = Function",null,null,"Constants"]
[null,"p = Property"]
["Class","s = Sub","Arguments…",null,"TreeLineStyleConstants","tvwTreeLines",0," &H0"]
[null,null,null,null,null,"tvwRootLines",1," &H1"]
["ITreeView  Dispatch","f   GetVisibleCount As Long"]
[null,"f   HitTest As INode","x As Single","y As Single","TreeRelationshipConstants","tvwFirst",0," &H0"]
[null,"p   Appearance As AppearanceConstants",null,null,null,"tvwLast",1," &H1"]
[null,"p   BorderStyle As BorderStyleConstants",null,null,null,"tvwNext",2," &H2"]
[null,"p   Checkboxes As Boolean",null,null,null,"tvwPrevious",3," &H3"]
[null,"p   DropHighlight As INode",null,null,null,"tvwChild",4," &H4"]
[null,"p   Enabled As Boolean"]
[null,"p   Font As Font",null,null,"TreeStyleConstants","tvwTextOnly",0," &H0"]
[null,"p   FullRowSelect As Boolean",null,null,null,"tvwPictureText",1," &H1"]
[null,"p   HideSelection As Boolean",null,null,null,"tvwPlusMinusText",2," &H2"]
[null,"p   HotTracking As Boolean",null,null,null,"tvwPlusPictureText",3," &H3"]
[null,"p   ImageList As Object",null,null,null,"tvwTreelinesText",4," &H4"]
[null,"p   Indentation As Single",null,null,null,"tvwTreelinesPictureText",5," &H5"]
[null,"p   LabelEdit As LabelEditConstants",null,null,null,"tvwTreelinesPlusMinusText",6," &H6"]
[null,"p   LineStyle As TreeLineStyleConstants",null,null,null,"tvwTreelinesPlusMinusPictureText",7," &H7"]
[null,"p   MouseIcon As Picture"]
[null,"p   MousePointer As MousePointerConstants",null,null,"LabelEditConstants","tvwAutomatic",0," &H0"]
[null,"p   Nodes As INodes",null,null,null,"tvwManual",1," &H1"]
[null,"p   OLEDragMode As OLEDragConstants"]
[null,"p   OLEDropMode As OLEDropConstants"]
[null,"p   PathSeparator As String"]
[null,"p   Scroll As Boolean"]
[null,"p   SelectedItem As INode"]
[null,"p   SingleSel As Boolean"]
[null,"p   Sorted As Boolean"]
[null,"p   Style As TreeStyleConstants"]
[null,"p   hWnd As Long"]
[null,"s   AboutBox"]
[null,"s   OLEDrag"]
[null,"s   Refresh"]
[null,"s   StartLabelEdit"]
[]
["ITreeViewEvents  Dispatch","s   AfterLabelEdit","Cancel As Integer","NewString As String"]
[null,"s   BeforeLabelEdit","Cancel As Integer"]
[null,"s   Click"]
[null,"s   Collapse","Node() As Node"]
[null,"s   DblClick"]
[null,"s   Expand","Node() As Node"]
[null,"s   KeyDown","KeyCode As Integer","Shift As Integer"]
[null,"s   KeyPress","KeyAscii As Integer"]
[null,"s   KeyUp","KeyCode As Integer","Shift As Integer"]
[null,"s   MouseDown","Button As Integer","Shift As Integer"]
[null,"s   MouseMove","Button As Integer","Shift As Integer"]
[null,"s   MouseUp","Button As Integer","Shift As Integer"]
[null,"s   NodeCheck","Node() As Node"]
[null,"s   NodeClick","Node() As Node"]
[null,"s   OLECompleteDrag","Effect As Long"]
[null,"s   OLEDragDrop","Data() As DataObject","Effect As Long"]
[null,"s   OLEDragOver","Data() As DataObject","Effect As Long"]
[null,"s   OLEGiveFeedback","Effect As Long","DefaultCursors As Boolean"]
[null,"s   OLESetData","Data() As DataObject","DataFormat As Integer"]
[null,"s   OLEStartDrag","Data() As DataObject","AllowedEffects As Long"]
[]
["INode  Dispatch","f   CreateDragImage As Picture"]
[null,"f   EnsureVisible As Boolean"]
[null,"p   BackColor As <Unsupported Variant Type>"]
[null,"p   Bold As Boolean"]
[null,"p   Checked As Boolean"]
[null,"p   Child As INode"]
[null,"p   Children As Integer"]
[null,"p   Expanded As Boolean"]
[null,"p   ExpandedImage As Variant"]
[null,"p   FirstSibling As INode"]
[null,"p   ForeColor As <Unsupported Variant Type>"]
[null,"p   FullPath As String"]
[null,"p   Image As Variant"]
[null,"p   Index As Integer"]
[null,"p   Key As String"]
[null,"p   LastSibling As INode"]
[null,"p   Next As INode"]
[null,"p   _ObjectDefault As String"]
[null,"p   Parent As INode"]
[null,"p   Previous As INode"]
[null,"p   Root As INode"]
[null,"p   Selected As Boolean"]
[null,"p   SelectedImage As Variant"]
[null,"p   Sorted As Boolean"]
[null,"p   Tag As Variant"]
[null,"p   Tag As Variant"]
[null,"p   Text As String"]
[null,"p   Visible As Boolean"]
[]
["INodes  Dispatch","f   Add As INode","[Relative]  As Variant","[Relationship]  As Variant","[Key]  As Variant","[Text]  As Variant","[Image]  As Variant","[SelectedImage]  As Variant"]
[null,"p   ControlDefault As INode","Index As Variant"]
[null,"p   Count As Integer"]
[null,"p   Item As INode","Index As Variant"]
[null,"s   Clear"]
[null,"s   Remove","Index As Variant"]