[TBD]
Common methods apply to most windows, controls and resources.
new(PARENT, %OPTIONS)
Creates a new TreeView object
can also be called as PARENT->AddTreeView(%OPTIONS)
.
Class specific %OPTIONS are:
-imagelist => IMAGELIST -tooltip => Win32::GUI::Tooltip -lines => 0/1 -rootlines => 0/1 -buttons => 0/1 enables or disables the +/- buttons to expand/collapse tree items. -showselalways => 0/1 -checkboxes => 0/1 -trackselect => 0/1 -disabledragdrop => 0/1 -editlabels => 0/1 -fullrowselect => 0/1 -nonevenheight => 0/1 -noscroll => 0/1 -notooltips => 0/1 -rtlreading => 0/1 -singleexpand => 0/1
See also the common options.
BackColor([COLOR])
Gets or sets the background color for the control.
ChangeItem(NODE, %OPTIONS)
See SetItem()
Clear([NODE])
Deletes all nodes from the TreeView if no argument is given; otherwise, delete all nodes under the given NODE.
Collapse(NODE)
Closes a NODE of the TreeView.
Count()
See GetCount()
CreateDragImage(NODE)
Creates a dragging bitmap for the specified item in a tree view control.
DeleteAllItems()
Deletes all nodes from the TreeView.
DeleteItem(NODE)
Removes the specified NODE from the TreeView.
EditLabel(NODE)
Begins in-place editing of the specified item's text, replacing the text of the item with a single-line edit control containing the text.
EndEditLabelNow([FLAG_CANCEL=TRUE])
Ends the editing of a tree view item's label.
EnsureVisible(NODE)
Ensures that a tree view item is visible, expanding the parent item or scrolling the tree view control, if necessary.
Expand(NODE, [FLAG])
Expands or collapses the list of child items associated with the specified parent item.
FirstVisible([NODE])
Set or Get first visible node.
GetBkColor()
Retrieves the current background color of the TreeView
GetChild(NODE)
Returns the handle of the first child node for the given NODE.
GetCount()
Returns the number of nodes in the TreeView.
GetDropHilight()
Retrieves the tree view item that is the target of a drag-and-drop operation.
GetEditControl()
Retrieves the handle to the edit control being used to edit a tree view item's text.
GetFirstVisible()
Retrieves the first visible item in a TreeView.
GetImageList([TYPE=TVSIL_NORMAL])
Retrieves the handle to the normal or state image list associated with a TreeView. TYPE = TVSIL_NORMAL | TVSIL_STATE
GetIndent()
Retrieves the amount, in pixels, that child items are indented relative to their parent items.
GetInsertMarkColor()
Retrieves the color used to draw the insertion mark for the tree view.
GetISearchString(STRING)
Retrieves the incremental search string for a tree view control.
GetItem(NODE)
Returns an associative array of information about the given NODE:
-children -image -parent -selectedimage -state -text
GetItemHeight()
Retrieves the current height of the tree view items.
GetItemRect(NODE,[FLAG=FALSE])
Retrieves the bounding rectangle for a tree view item and indicates whether the item is visible. If FLAG is TRUE, the bounding rectangle includes only the text of the item. Otherwise, it includes the entire line that the item occupies in the tree view control.
GetLastVisible()
Retrieves the last expanded item in a tree view control.
GetNextItem(ITEM,FLAG)
Retrieves the tree view item that bears the specified relationship to a specified item.
FLAG specifying the item to retrieve :
TVGN_CARET = Retrieves the currently selected item. TVGN_CHILD = Retrieves the first child item of the item specified by the hitem parameter. TVGN_DROPHILITE = Retrieves the item that is the target of a drag-and-drop operation. TVGN_FIRSTVISIBLE = Retrieves the first visible item. TVGN_NEXT = Retrieves the next sibling item. TVGN_NEXTVISIBLE = Retrieves the next visible item that follows the specified item. The specified item must be visible. TVGN_PARENT = Retrieves the parent of the specified item. TVGN_PREVIOUS = Retrieves the previous sibling item. TVGN_PREVIOUSVISIBLE = Retrieves the first visible item that precedes the specified item. The specified item must be visible. TVGN_ROOT = Retrieves the topmost or very first item of the tree view control.
GetNextSibling(NODE)
Returns the handle of the next sibling node for the given NODE.
GetNextVisible(NODE)
Retrieves the next visible item that follows a specified item in a tree view control.
GetParent(NODE)
Returns the handle of the parent node for the given NODE.
NOTE: With no NODE parameter this is the standard GetParent() method, returning the parent window.
GetPrevSibling(NODE)
Returns the handle of the previous sibling node for the given NODE.
GetPrevVisible(NODE)
Retrieves the first visible item that precedes a specified item in a TreeView.
GetRoot()
Returns the handle of the TreeView root node.
GetScrollTime()
Retrieves the maximum scroll time for the TreeView.
GetSelection()
Returns the handle of the currently selected node.
GetTextColor()
Retrieves the current text color of the control.
GetToolTips()
Retrieves the handle to the child tooltip control used by a TreeView.
GetUnicodeFormat()
Retrieves the UNICODE character format flag for the control.
GetVisibleCount()
Obtains the number of items that can be fully visible in the client window of a TreeView.
HitTest(X, Y)
Determines the location of the specified point relative to the client area of a TreeView.
Indent([VALUE])
Set or Get Indent value.
InsertItem(%OPTIONS)
Inserts a new node in the TreeView.
Allowed %OPTIONS are:
-bold => 0/1, default 0 -image => NUMBER index of an image from the associated ImageList -item => NUMBER handle of the node after which the new node is to be inserted, or one of the following special values: 0xFFFF0001: at the beginning of the list 0xFFFF0002: at the end of the list 0xFFFF0003: in alphabetical order the default value is at the end of the list -parent => NUMBER handle of the parent node for the new node -selected => 0/1, default 0 -selectedimage => NUMBER index of an image from the associated ImageList -text => STRING the text for the node
ItemCheck(NODE, [VALUE])
Set or Get node checked state.
ItemInfo(NODE)
See GetItem()
Reset()
See DeleteAllItems()
Select(NODE, [FLAG=TVGN_CARET])
Selects the given NODE in the TreeView. If NODE is 0 (zero), the selected item, if any, is deselected.
Optional FLAG parameter
TVGN_CARET = Sets the selection to the given item. TVGN_DROPHILITE = Redraws the given item in the style used to indicate the target of a drag-and-drop operation. TVGN_FIRSTVISIBLE = Ensures that the specified item is visible, and, if possible, displays it at the top of the control's window.
SelectDropTarget(NODE)
Redraws a specified tree view control item in the style used to indicate the target of a drag-and-drop operation.
SelectedItem()
See GetSelection()
SelectItem(NODE)
Selects the specified tree view item.
SelectSetFirstVisible(NODE)
Scrolls the tree view control vertically to ensure that the specified item is visible. If possible, the specified item becomes the first visible item at the top of the control's window.
SetBkColor(COLOR)
Sets the background color for the control.
SetImageList(IMAGELIST, [TYPE])
Sets the normal or state image list for a tree view control and redraws the control using the new images.
SetIndent(VALUE)
Sets the width of indentation for a tree view control and redraws the control to reflect the new width.
SetInsertMark(NODE,[FLAG_AFTER=FALSE])
Sets the insertion mark in a tree view control.
SetInsertMarkColor(COLOR)
Sets the color used to draw the insertion mark for the tree view.
SetItem(NODE, %OPTIONS)
Change most of the options used when the item was created (see InsertItem()). Allowed %OPTIONS are:
-bold -image -selected -selectedimage -text
SetItemHeight(HEIGHT)
Sets the height of the tree view items.
SetScrollTime(TIME)
Sets the maximum scroll time for the tree view control.
SetTextColor(COLOR)
Sets the text color of the control.
SetToolTips(TOOLTIP)
Sets a tree view control's child tooltip control.
SetUnicodeFormat(FLAG)
Sets the UNICODE character format flag for the control.
Sort(NODE)
See SortChildren()
SortChildren(NODE)
Sorts the childs of the specified NODE in the TreeView.
TextColor([COLOR])
Gets or sets the text color for the control.
VisibleCount()
Common events apply to most windows and controls.
BeginLabelEdit(NODE)
Sent when the user is about to edit the specified NODE of the TreeView The event should return 0 to prevent the action, 1 to allow it.
For a treeview to receive this event, -editlabels need to be set to true.
Collapse(NODE)
Sent when the user closes the specified NODE of the TreeView.
Collapsing(NODE)
Sent when the user is about to close the specified NODE of the TreeView. The event should return 0 to prevent the action, 1 to allow it.
EndLabelEdit(NODE,TEXT)
Sent when the user has finished editing a label in the TreeView control. You have explicitly set the text of the node to reflect the new changes. If the user cancels the edit, the text is undef.
Expand(NODE)
Sent when the user opens the specified NODE of the TreeView.
Expanding(NODE)
Sent when the user is about to open the specified NODE of the TreeView The event should return 0 to prevent the action, 1 to allow it.
KeyDown(KEY)
Sent when the user presses a key while the TreeView control has focus; KEY is the ASCII code of the key being pressed.
NodeClick(NODE)
Sent when the user clicks on the specified NODE of the TreeView.
Documentation for Win32::GUI v1.06 created 13 Feb 2008
This document is autogenerated by the build process. Edits made here will be lost. Edit docs/per_package.tpl instead.
Homepage: http://perl-win32-gui.sourceforge.net/.
For further support join the users mailing list(perl-win32-gui-users@lists.sourceforge.net
) from the website
at http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users. There is a searchable list archive at http://sourceforge.net/mail/.
Copyright (c) 1997..2008 Aldo Calpini. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.