
Public Types | |
| enum | HitTestFlags |
| enum | LabelMatch |
Public Member Functions | |
| TreeItemId | AddRoot (string text, int image, int selImage, TreeItemData data) |
| TreeItemId | AddRoot (string text, int image, int selImage) |
| TreeItemId | AddRoot (string text, int image) |
| TreeItemId | AddRoot (string text) |
| TreeItemId[] | AllItems () |
| TreeItemId[] | AllItemsAtOrBelow (TreeItemId parent_item) |
| TreeItemId[] | AllItemsBelow (TreeItemId parent_item) |
| TreeItemId | AppendItem (TreeItemId parentId, string text, int image, int selImage, TreeItemData data) |
| TreeItemId | AppendItem (TreeItemId parentId, string text, int image, int selImage) |
| TreeItemId | AppendItem (TreeItemId parentId, string text, int image) |
| TreeItemId | AppendItem (TreeItemId parentId, string text) |
| void | AssignImageList (ImageList imageList) |
| void | AssignStateImageList (ImageList imageList) |
| void | Collapse (TreeItemId item) |
| void | CollapseAndReset (TreeItemId item) |
| bool | Create (Window parent, int id, Point pos, Size size, wx.WindowStyles style, string name) |
| void | Delete (TreeItemId item) |
| void | DeleteAllItems () |
| void | DeleteChildren (TreeItemId item) |
| void | EditLabel (TreeItemId item) |
| void | EnsureVisible (TreeItemId item) |
| void | Expand (TreeItemId item) |
| TreeItemId | FindFirstWithLabel (string requestString, LabelMatch labelMatch) |
| ICollection< TreeItemId > | FindLabels (string requestString, LabelMatch labelMatch) |
| TreeItemId[] | GetAllItems () |
| bool | GetBoundingRect (TreeItemId item, ref Rectangle rect, bool textOnly) |
| bool | GetBoundingRect (TreeItemId item, ref Rectangle rect) |
| TreeItemId[] | GetChildren (TreeItemId item) |
| int | GetChildrenCount (TreeItemId item, bool recursively) |
| int | GetChildrenCount (TreeItemId item) |
| TreeItemId | GetFirstChild (TreeItemId item, ref IntPtr cookie) |
| TreeItemId | GetFirstVisibleItem () |
| Colour | GetItemBackgroundColour (TreeItemId item) |
| TreeItemData | GetItemData (TreeItemId item) |
| Font | GetItemFont (TreeItemId item) |
| int | GetItemImage (TreeItemId item, TreeItemIcon which) |
| int | GetItemImage (TreeItemId item) |
| TreeItemId | GetItemParent (TreeItemId item) |
| string | GetItemText (TreeItemId item) |
| Colour | GetItemTextColour (TreeItemId item) |
| TreeItemId | GetLastChild (TreeItemId item) |
| TreeItemId | GetNextChild (TreeItemId item, ref IntPtr cookie) |
| TreeItemId | GetNextSibling (TreeItemId item) |
| TreeItemId | GetNextVisible (TreeItemId item) |
| TreeItemId | GetPrevSibling (TreeItemId item) |
| TreeItemId | GetPrevVisible (TreeItemId item) |
| TreeItemId[] | GetVisibleItems () |
| bool | HasChildren (TreeItemId item) |
| TreeItemId | HitTest (Point pt, out HitTestFlags flags) |
| TreeItemId | InsertItem (TreeItemId parent, int before, string text, int image, int sellimage, TreeItemData data) |
| TreeItemId | InsertItem (TreeItemId parent, int before, string text, int image, int sellimage) |
| TreeItemId | InsertItem (TreeItemId parent, int before, string text, int image) |
| TreeItemId | InsertItem (TreeItemId parent, int before, string text) |
| TreeItemId | InsertItem (TreeItemId parent, TreeItemId previous, string text, int image, int sellimage, TreeItemData data) |
| TreeItemId | InsertItem (TreeItemId parent, TreeItemId previous, string text, int image, int sellimage) |
| TreeItemId | InsertItem (TreeItemId parent, TreeItemId previous, string text, int image) |
| TreeItemId | InsertItem (TreeItemId parent, TreeItemId previous, string text) |
| bool | IsBold (TreeItemId item) |
| bool | IsExpanded (TreeItemId item) |
| bool | IsSelected (TreeItemId item) |
| bool | IsVisible (TreeItemId item) |
| bool | ItemHasChildren (TreeItemId item) |
| virtual int | OnCompareItems (TreeItemId item1, TreeItemId item2) |
| TreeItemId | PrependItem (TreeItemId parent, string text, int image, int sellimage, TreeItemData data) |
| TreeItemId | PrependItem (TreeItemId parent, string text, int image, int sellimage) |
| TreeItemId | PrependItem (TreeItemId parent, string text, int image) |
| TreeItemId | PrependItem (TreeItemId parent, string text) |
| void | ScrollTo (TreeItemId item) |
| TreeItemId[] | Selections () |
| TreeItemId[] | SelectionsAtOrBelow (TreeItemId parent_item) |
| TreeItemId[] | SelectionsBelow (TreeItemId parent_item) |
| TreeItemId[] | SelectionsOld () |
| void | SelectItem (TreeItemId item) |
| void | SetImageList (ImageList imageList) |
| void | SetItemBackgroundColour (TreeItemId item, Colour col) |
| void | SetItemBold (TreeItemId item, bool bold) |
| void | SetItemBold (TreeItemId item) |
| void | SetItemData (TreeItemId item, TreeItemData data) |
| void | SetItemFont (TreeItemId item, Font font) |
| void | SetItemHasChildren (TreeItemId item, bool has) |
| void | SetItemHasChildren (TreeItemId item) |
| void | SetItemImage (TreeItemId item, int image, TreeItemIcon which) |
| void | SetItemImage (TreeItemId item, int image) |
| void | SetItemSelectedImage (TreeItemId item, int selImage) |
| void | SetItemText (TreeItemId item, string text) |
| void | SetItemTextColour (TreeItemId item, Colour col) |
| void | SortChildren (TreeItemId item) |
| void | Toggle (TreeItemId item) |
| void | ToggleItemSelection (TreeItemId item) |
| TreeCtrl (Window parent, Point pos, Size size, wx.WindowStyles style, string name) | |
| TreeCtrl (Window parent, Point pos, Size size, wx.WindowStyles style) | |
| TreeCtrl (Window parent, Point pos, Size size) | |
| TreeCtrl (Window parent, Point pos) | |
| TreeCtrl (Window parent) | |
| TreeCtrl (Window parent, int id, Point pos, Size size, wx.WindowStyles style, string name) | |
| TreeCtrl (Window parent, int id, Point pos, Size size, wx.WindowStyles style) | |
| TreeCtrl (Window parent, int id, Point pos, Size size) | |
| TreeCtrl (Window parent, int id, Point pos) | |
| TreeCtrl (Window parent, int id) | |
| TreeCtrl () | |
| TreeCtrl (IntPtr wxObject) | |
| void | Unselect () |
| void | UnselectAll () |
| void | UnselectItem (TreeItemId item) |
Static Public Attributes | |
| static readonly wx.WindowStyles | wxTR_DEFAULT_STYLE = (wx.WindowStyles)wxTreeCtrl_GetDefaultStyle() |
Properties | |
| int | Count [get] |
| ImageList | ImageList [get, set] |
| uint | Indent [get, set] |
| TreeItemId | RootItem [get] |
| TreeItemId | Selection [get, set] |
| uint | Spacing [get, set] |
| ImageList | StateImageList [get, set] |
Events | |
| event EventListener | BeginDrag [add, remove] |
| event EventListener | BeginLabelEdit [add, remove] |
| event EventListener | BeginRightDrag [add, remove] |
| event EventListener | DeleteItem [add, remove] |
| event EventListener | EndDrag [add, remove] |
| event EventListener | EndLabelEdit [add, remove] |
| event EventListener | GetInfo [add, remove] |
| event EventListener | ItemActivate [add, remove] |
| event EventListener | ItemCollapse [add, remove] |
| event EventListener | ItemCollapsing [add, remove] |
| event EventListener | ItemExpand [add, remove] |
| event EventListener | ItemExpanding [add, remove] |
| event EventListener | ItemMiddleClick [add, remove] |
| event EventListener | ItemRightClick [add, remove] |
| override event EventListener | KeyDown [add, remove] |
| event EventListener | SelectionChange [add, remove] |
| event EventListener | SelectionChanging [add, remove] |
| event EventListener | SetInfo [add, remove] |
wxTreeCtrl.
The tree control displays its items in a tree like structure. Each item has its own (optional) icon and a label. An item may be either collapsed (meaning that its children are not visible) or expanded (meaning that its children are shown). Each item in the tree is identified by its itemId which is of opaque data type wxTreeItemId. You can test whether an item is valid by calling wx.TreeItemId.IsOk.
The items text and image may be retrieved and changed with GetItemText/SetItemText and GetItemImage/SetItemImage. In fact, an item may even have two images associated with it: the normal one and another one for selected state which is set/retrieved with SetItemSelectedImage/GetItemSelectedImage functions, but this functionality might be unavailable on some platforms.
Tree items have several attributes: an item may be selected or not, visible or not, bold or not. It may also be expanded or collapsed. All these attributes may be retrieved with the corresponding functions: IsSelected, IsVisible, IsBold and IsExpanded. Only one item at a time may be selected, selecting another one (with SelectItem) automatically unselects the previously selected one.
In addition to its icon and label, a user-specific data structure may be associated with all tree items. If you wish to do it, you should derive a class from wxTreeItemData which is a very simple class having only one function GetId() which returns the id of the item this data is associated with. This data will be freed by the control itself when the associated item is deleted (all items are deleted when the control is destroyed), so you shouldn't delete it yourself (if you do it, you should call SetItemData(NULL) to prevent the tree from deleting the pointer second time). The associated data may be retrieved with GetItemData() function.
Working with trees is relatively straightforward if all the items are added to the tree at the moment of its creation. However, for large trees it may be very inefficient. To improve the performance you may want to delay adding the items to the tree until the branch containing the items is expanded: so, in the beginning, only the root item is created (with AddRoot). Other items are added when EVT_TREE_ITEM_EXPANDING event is received: then all items lying immediately under the item being expanded should be added, but, of course, only when this event is received for the first time for this item - otherwise, the items would be added twice if the user expands/collapses/re-expands the branch.
The tree control provides functions for enumerating its items. There are 3 groups of enumeration functions: for the children of a given item, for the sibling of the given item and for the visible items (those which are currently shown to the user: an item may be invisible either because its branch is collapsed or because it is scrolled out of view). Child enumeration functions require the caller to give them a cookie parameter: it is a number which is opaque to the caller but is used by the tree control itself to allow multiple enumerations to run simultaneously (this is explicitly allowed). The only thing to remember is that the cookie passed to GetFirstChild and to GetNextChild should be the same variable (and that nothing should be done with it by the user code).
Among other features of the tree control are: item sorting with SortChildren which uses the user-defined comparison function OnCompareItems (by default the comparison is the alphabetic comparison of tree labels), hit testing (determining to which portion of the control the given point belongs, useful for implementing drag-and-drop in the tree) with HitTest and editing of the tree item labels in place (see EditLabel). Finally, the tree control has a keyboard interface: the cursor navigation (arrow) keys may be used to change the current selection. "HOME" and "END" are used to go to the first/last sibling of the current item. '+', '-' and '*' expand, collapse and toggle the current branch. Note, however, that "DEL" and "INS" keys do nothing by default, but it is common to associate them with deleting an item from a tree and inserting a new one into it.
Please note a serious problem with the tree control: The control does not like changes in its layout or selections on processing events. In such cases, I sometimes encountered access violations. The reason is unknown. Consider, that you want to react on leaving a text in a window in such a way, that a tree control changes the selected node or the tree has to be rebuilt. You leave the text control moving the mouse, the desired actions are conducted but suddenly the runtime environment reports a severe C++ exception. Fortunately, such problems can apparently be avoided using pending events as described in Defining and handling custom events in wx.NET. Use a custom command event type to conduct your actions after processing the mouse events.
Flags representing possible classifications of wx.TreeCtrl.HitTest().
Method to detect matching labels in FindLabels().
| wx.TreeCtrl.TreeCtrl | ( | IntPtr | wxObject | ) |
| wx.TreeCtrl.TreeCtrl | ( | ) |
| wx.TreeCtrl.TreeCtrl | ( | Window | parent, | |
| int | id | |||
| ) |
| wx.TreeCtrl.TreeCtrl | ( | Window | parent, | |
| int | id, | |||
| Point | pos | |||
| ) |
| wx.TreeCtrl.TreeCtrl | ( | Window | parent, | |
| int | id, | |||
| Point | pos, | |||
| Size | size | |||
| ) |
| wx.TreeCtrl.TreeCtrl | ( | Window | parent, | |
| int | id, | |||
| Point | pos, | |||
| Size | size, | |||
| wx.WindowStyles | style | |||
| ) |
| wx.TreeCtrl.TreeCtrl | ( | Window | parent, | |
| int | id, | |||
| Point | pos, | |||
| Size | size, | |||
| wx.WindowStyles | style, | |||
| string | name | |||
| ) |
| wx.TreeCtrl.TreeCtrl | ( | Window | parent | ) |
| wx.TreeCtrl.TreeCtrl | ( | Window | parent, | |
| Point | pos | |||
| ) |
| wx.TreeCtrl.TreeCtrl | ( | Window | parent, | |
| Point | pos, | |||
| Size | size | |||
| ) |
| wx.TreeCtrl.TreeCtrl | ( | Window | parent, | |
| Point | pos, | |||
| Size | size, | |||
| wx.WindowStyles | style | |||
| ) |
| wx.TreeCtrl.TreeCtrl | ( | Window | parent, | |
| Point | pos, | |||
| Size | size, | |||
| wx.WindowStyles | style, | |||
| string | name | |||
| ) |
| TreeItemId wx.TreeCtrl.AddRoot | ( | string | text, | |
| int | image, | |||
| int | selImage, | |||
| TreeItemData | data | |||
| ) |
Adds the root node to the tree, returning the new item.
The image and selImage parameters are an index within the normal image list specifying the image to use for unselected and selected items, respectively. If image > -1 and selImage is -1, the same image is used for both selected and unselected items.
This method reflects the wxWidgets 2.6 requirement that data must not be null on hidden roots. Do not provide already used instances for data. This method will raise exceptions in that cases.
| text | The name of the root node | |
| image | The index of the image that shall be presented with the node. | |
| selImage | The index of the image that shall be presented with the node if the node is selected. |
| TreeItemId wx.TreeCtrl.AddRoot | ( | string | text, | |
| int | image, | |||
| int | selImage | |||
| ) |
Adds the root node to the tree, returning the new item.
The image and selImage parameters are an index within the normal image list specifying the image to use for unselected and selected items, respectively. If image > -1 and selImage is -1, the same image is used for both selected and unselected items.
| text | The name of the root node | |
| image | The index of the image that shall be presented with the node. | |
| selImage | The index of the image that shall be presented with the node if the node is selected. |
| TreeItemId wx.TreeCtrl.AddRoot | ( | string | text, | |
| int | image | |||
| ) |
Adds the root node to the tree, returning the new item.
| text | The name of the root node | |
| image | The index of the image that shall be presented with the node. |
| TreeItemId wx.TreeCtrl.AddRoot | ( | string | text | ) |
Adds the root node to the tree, returning the new item.
| text | The name of the root node |
| TreeItemId [] wx.TreeCtrl.AllItems | ( | ) |
| TreeItemId [] wx.TreeCtrl.AllItemsAtOrBelow | ( | TreeItemId | parent_item | ) |
| TreeItemId [] wx.TreeCtrl.AllItemsBelow | ( | TreeItemId | parent_item | ) |
| TreeItemId wx.TreeCtrl.AppendItem | ( | TreeItemId | parentId, | |
| string | text, | |||
| int | image, | |||
| int | selImage, | |||
| TreeItemData | data | |||
| ) |
Appends an item to the end of the branch identified by parent, return a new item id.
The image and selImage parameters are an index within the normal image list specifying the image to use for unselected and selected items, respectively. If image > -1 and selImage is -1, the same image is used for both selected and unselected items.
Please note, that an appended item may not be visible because the parent is not expanded. So, you might want to use EnsureVisible after calling this method.
| parentId | The parent node that will get a new child. | |
| text | The label text of the new node. | |
| image | An index in the image list of the control representing the icon of the node or -1. | |
| selImage | An index in the image list of the control representing the icon of the node if selected or -1. | |
| data | Additional data that is associated with the node or null. |
| TreeItemId wx.TreeCtrl.AppendItem | ( | TreeItemId | parentId, | |
| string | text, | |||
| int | image, | |||
| int | selImage | |||
| ) |
Appends an item to the end of the branch identified by parent, return a new item id.
The image and selImage parameters are an index within the normal image list specifying the image to use for unselected and selected items, respectively. If image > -1 and selImage is -1, the same image is used for both selected and unselected items.
Please note, that an appended item may not be visible because the parent is not expanded. So, you might want to use EnsureVisible after calling this method.
| parentId | The parent node that will get a new child. | |
| text | The label text of the new node. | |
| image | An index in the image list of the control representing the icon of the node or -1. | |
| selImage | An index in the image list of the control representing the icon of the node if selected or -1. |
| TreeItemId wx.TreeCtrl.AppendItem | ( | TreeItemId | parentId, | |
| string | text, | |||
| int | image | |||
| ) |
Appends an item to the end of the branch identified by parent, return a new item id.
The specified image will be used to display the node if selected or unselected.
Please note, that an appended item may not be visible because the parent is not expanded. So, you might want to use EnsureVisible after calling this method.
| parentId | The parent node that will get a new child. | |
| text | The label text of the new node. | |
| image | An index in the image list of the control representing the icon of the node or -1. |
| TreeItemId wx.TreeCtrl.AppendItem | ( | TreeItemId | parentId, | |
| string | text | |||
| ) |
Appends an item to the end of the branch identified by parent, return a new item id.
Please note, that an appended item may not be visible because the parent is not expanded. So, you might want to use EnsureVisible after calling this method.
| parentId | The parent node that will get a new child. | |
| text | The label text of the new node. |
| void wx.TreeCtrl.AssignImageList | ( | ImageList | imageList | ) |
Assigns an image list to the control containing the icons of the nodes.
| imageList | The image list containing the icons. |
| void wx.TreeCtrl.AssignStateImageList | ( | ImageList | imageList | ) |
| void wx.TreeCtrl.Collapse | ( | TreeItemId | item | ) |
Collapses the designated tree node.
| item | The node to be collapsed. |
| void wx.TreeCtrl.CollapseAndReset | ( | TreeItemId | item | ) |
| bool wx.TreeCtrl.Create | ( | Window | parent, | |
| int | id, | |||
| Point | pos, | |||
| Size | size, | |||
| wx.WindowStyles | style, | |||
| string | name | |||
| ) |
| void wx.TreeCtrl.Delete | ( | TreeItemId | item | ) |
| void wx.TreeCtrl.DeleteAllItems | ( | ) |
Deletes all items in the control. Note that this may not generate EVT_TREE_DELETE_ITEM events under some Windows versions although normally such event is generated for each removed item.
| void wx.TreeCtrl.DeleteChildren | ( | TreeItemId | item | ) |
| void wx.TreeCtrl.EditLabel | ( | TreeItemId | item | ) |
| void wx.TreeCtrl.EnsureVisible | ( | TreeItemId | item | ) |
Ensures by node expansion and scrolling that the designated item is visible.
| item | The item that shall be visible. |
| void wx.TreeCtrl.Expand | ( | TreeItemId | item | ) |
Expands the designated tree node.
| item | The node to be expanded. |
| TreeItemId wx.TreeCtrl.FindFirstWithLabel | ( | string | requestString, | |
| LabelMatch | labelMatch | |||
| ) |
Finds the first tree item whose label matches the provided request string.
| requestString | The string that shall be searched in item labels. | |
| labelMatch | The method for comparing labels and request string. |
null if nothing matches.| ICollection<TreeItemId> wx.TreeCtrl.FindLabels | ( | string | requestString, | |
| LabelMatch | labelMatch | |||
| ) |
Returns an array of tree item identifiers designating those tree items with labels matching the provided string.
| requestString | The string that shall be searched in item labels. | |
| labelMatch | The method for comparing labels and request string. |
| TreeItemId [] wx.TreeCtrl.GetAllItems | ( | ) |
Returns the IDs of all nodes that have been added to the control beginning with the root node. The result will be null iff this is empty.
| bool wx.TreeCtrl.GetBoundingRect | ( | TreeItemId | item, | |
| ref Rectangle | rect, | |||
| bool | textOnly | |||
| ) |
| bool wx.TreeCtrl.GetBoundingRect | ( | TreeItemId | item, | |
| ref Rectangle | rect | |||
| ) |
| TreeItemId [] wx.TreeCtrl.GetChildren | ( | TreeItemId | item | ) |
An array comprising all direct children of the argument or null if argument designates a leaf node.
| item | This method will collect the children of this tree node. |
| int wx.TreeCtrl.GetChildrenCount | ( | TreeItemId | item, | |
| bool | recursively | |||
| ) |
Get the number of direct (recursively is false) or also of children of children etc.
| item | Designator of the root node. This method will return 0 if this is not OK. | |
| recursively | This will also count children of children of item iff true. |
| int wx.TreeCtrl.GetChildrenCount | ( | TreeItemId | item | ) |
Get number of direct and indirect (recursively found) children.
| item | Designator of the root node. This method will return 0 if this is not OK. |
| TreeItemId wx.TreeCtrl.GetFirstChild | ( | TreeItemId | item, | |
| ref IntPtr | cookie | |||
| ) |
Returns the first child of the designated tree node. Creates a cookie representing this enumeration.
| item | This method will collect children of this tree node. | |
| cookie | This designates the enumeration. The cookie represents a state of enumeration. |
| TreeItemId wx.TreeCtrl.GetFirstVisibleItem | ( | ) |
| Colour wx.TreeCtrl.GetItemBackgroundColour | ( | TreeItemId | item | ) |
| TreeItemData wx.TreeCtrl.GetItemData | ( | TreeItemId | item | ) |
Returns the item data that has been stored for the designated tree item.
| item | Designates the tree node whose data is requested. |
null.| Font wx.TreeCtrl.GetItemFont | ( | TreeItemId | item | ) |
| int wx.TreeCtrl.GetItemImage | ( | TreeItemId | item, | |
| TreeItemIcon | which | |||
| ) |
| int wx.TreeCtrl.GetItemImage | ( | TreeItemId | item | ) |
| TreeItemId wx.TreeCtrl.GetItemParent | ( | TreeItemId | item | ) |
The parent of the designated tree node. The result may be invalid of the argument is the root.
| item | The tree node. |
| string wx.TreeCtrl.GetItemText | ( | TreeItemId | item | ) |
Returns the text that has been associated with this tree item.
| item | Designator of the tree item. |
| Colour wx.TreeCtrl.GetItemTextColour | ( | TreeItemId | item | ) |
| TreeItemId wx.TreeCtrl.GetLastChild | ( | TreeItemId | item | ) |
Returns the last child of the designated tree node.
| item | This method will collect children of this tree node. |
| TreeItemId wx.TreeCtrl.GetNextChild | ( | TreeItemId | item, | |
| ref IntPtr | cookie | |||
| ) |
Returns the next child of the designated tree node..
| item | This method will collect children of this tree node. | |
| cookie | This designates the enumeration. The cookie represents a state of enumeration. |
| TreeItemId wx.TreeCtrl.GetNextSibling | ( | TreeItemId | item | ) |
Returns the next sibling of the specified item; call wx.TreeCtrl.GetPrevSibling() for the next sibling.
Returns an invalid tree item if there are no further children.
| TreeItemId wx.TreeCtrl.GetNextVisible | ( | TreeItemId | item | ) |
Returns the next visible item following the argument.
| item | This will return the next item following this one. |
| TreeItemId wx.TreeCtrl.GetPrevSibling | ( | TreeItemId | item | ) |
Returns the previous sibling of the specified item; call wx.TreeCtrl.GetNextSibling() for the next sibling.
Returns an invalid tree item if there are no further children.
| TreeItemId wx.TreeCtrl.GetPrevVisible | ( | TreeItemId | item | ) |
Returns the previsous visible item.
| item | This will return the next item following this one. |
| TreeItemId [] wx.TreeCtrl.GetVisibleItems | ( | ) |
An array comprising all visible tree node items or null if nothing is visible.
| item | This method will collect the children of this tree node. |
| bool wx.TreeCtrl.HasChildren | ( | TreeItemId | item | ) |
| TreeItemId wx.TreeCtrl.HitTest | ( | Point | pt, | |
| out HitTestFlags | flags | |||
| ) |
| TreeItemId wx.TreeCtrl.InsertItem | ( | TreeItemId | parent, | |
| int | before, | |||
| string | text, | |||
| int | image, | |||
| int | sellimage, | |||
| TreeItemData | data | |||
| ) |
| TreeItemId wx.TreeCtrl.InsertItem | ( | TreeItemId | parent, | |
| int | before, | |||
| string | text, | |||
| int | image, | |||
| int | sellimage | |||
| ) |
| TreeItemId wx.TreeCtrl.InsertItem | ( | TreeItemId | parent, | |
| int | before, | |||
| string | text, | |||
| int | image | |||
| ) |
| TreeItemId wx.TreeCtrl.InsertItem | ( | TreeItemId | parent, | |
| int | before, | |||
| string | text | |||
| ) |
| TreeItemId wx.TreeCtrl.InsertItem | ( | TreeItemId | parent, | |
| TreeItemId | previous, | |||
| string | text, | |||
| int | image, | |||
| int | sellimage, | |||
| TreeItemData | data | |||
| ) |
Inserts a new item into the tree. Please note, that the tree control will take ownership of the C++ instance wrapped by data. So, do not use an instance for data that has already been used.
| TreeItemId wx.TreeCtrl.InsertItem | ( | TreeItemId | parent, | |
| TreeItemId | previous, | |||
| string | text, | |||
| int | image, | |||
| int | sellimage | |||
| ) |
| TreeItemId wx.TreeCtrl.InsertItem | ( | TreeItemId | parent, | |
| TreeItemId | previous, | |||
| string | text, | |||
| int | image | |||
| ) |
| TreeItemId wx.TreeCtrl.InsertItem | ( | TreeItemId | parent, | |
| TreeItemId | previous, | |||
| string | text | |||
| ) |
| bool wx.TreeCtrl.IsBold | ( | TreeItemId | item | ) |
| bool wx.TreeCtrl.IsExpanded | ( | TreeItemId | item | ) |
| bool wx.TreeCtrl.IsSelected | ( | TreeItemId | item | ) |
True if the argument is a selected item.
| item | The item of interest. |
| bool wx.TreeCtrl.IsVisible | ( | TreeItemId | item | ) |
| bool wx.TreeCtrl.ItemHasChildren | ( | TreeItemId | item | ) |
| virtual int wx.TreeCtrl.OnCompareItems | ( | TreeItemId | item1, | |
| TreeItemId | item2 | |||
| ) | [virtual] |
| TreeItemId wx.TreeCtrl.PrependItem | ( | TreeItemId | parent, | |
| string | text, | |||
| int | image, | |||
| int | sellimage, | |||
| TreeItemData | data | |||
| ) |
| TreeItemId wx.TreeCtrl.PrependItem | ( | TreeItemId | parent, | |
| string | text, | |||
| int | image, | |||
| int | sellimage | |||
| ) |
| TreeItemId wx.TreeCtrl.PrependItem | ( | TreeItemId | parent, | |
| string | text, | |||
| int | image | |||
| ) |
| TreeItemId wx.TreeCtrl.PrependItem | ( | TreeItemId | parent, | |
| string | text | |||
| ) |
| void wx.TreeCtrl.ScrollTo | ( | TreeItemId | item | ) |
| TreeItemId [] wx.TreeCtrl.Selections | ( | ) |
| TreeItemId [] wx.TreeCtrl.SelectionsAtOrBelow | ( | TreeItemId | parent_item | ) |
| TreeItemId [] wx.TreeCtrl.SelectionsBelow | ( | TreeItemId | parent_item | ) |
| TreeItemId [] wx.TreeCtrl.SelectionsOld | ( | ) |
| void wx.TreeCtrl.SelectItem | ( | TreeItemId | item | ) |
SWets the selected item.
| item | The item that will be selected. |
| void wx.TreeCtrl.SetImageList | ( | ImageList | imageList | ) |
| void wx.TreeCtrl.SetItemBackgroundColour | ( | TreeItemId | item, | |
| Colour | col | |||
| ) |
| void wx.TreeCtrl.SetItemBold | ( | TreeItemId | item, | |
| bool | bold | |||
| ) |
| void wx.TreeCtrl.SetItemBold | ( | TreeItemId | item | ) |
| void wx.TreeCtrl.SetItemData | ( | TreeItemId | item, | |
| TreeItemData | data | |||
| ) |
Sets the client data for the provided item. This will raise an exception if data is already in use with other tree items.
| item | Designates the tree item that will be associated with data. | |
| data | Is the data that will be associated with the designated tree item. |
| void wx.TreeCtrl.SetItemFont | ( | TreeItemId | item, | |
| Font | font | |||
| ) |
| void wx.TreeCtrl.SetItemHasChildren | ( | TreeItemId | item, | |
| bool | has | |||
| ) |
| void wx.TreeCtrl.SetItemHasChildren | ( | TreeItemId | item | ) |
| void wx.TreeCtrl.SetItemImage | ( | TreeItemId | item, | |
| int | image, | |||
| TreeItemIcon | which | |||
| ) |
| void wx.TreeCtrl.SetItemImage | ( | TreeItemId | item, | |
| int | image | |||
| ) |
| void wx.TreeCtrl.SetItemSelectedImage | ( | TreeItemId | item, | |
| int | selImage | |||
| ) |
| void wx.TreeCtrl.SetItemText | ( | TreeItemId | item, | |
| string | text | |||
| ) |
Set the text associated with the tree item.
| item | designator of the tree item. | |
| text | Text that will be associated with the tree item. |
| void wx.TreeCtrl.SetItemTextColour | ( | TreeItemId | item, | |
| Colour | col | |||
| ) |
| void wx.TreeCtrl.SortChildren | ( | TreeItemId | item | ) |
| void wx.TreeCtrl.Toggle | ( | TreeItemId | item | ) |
| void wx.TreeCtrl.ToggleItemSelection | ( | TreeItemId | item | ) |
| void wx.TreeCtrl.Unselect | ( | ) |
| void wx.TreeCtrl.UnselectAll | ( | ) |
| void wx.TreeCtrl.UnselectItem | ( | TreeItemId | item | ) |
readonly wx.WindowStyles wx.TreeCtrl.wxTR_DEFAULT_STYLE = (wx.WindowStyles)wxTreeCtrl_GetDefaultStyle() [static] |
This is the default style for tree controls.
int wx.TreeCtrl.Count [get] |
The number of the contained nodes.
ImageList wx.TreeCtrl.ImageList [get, set] |
uint wx.TreeCtrl.Indent [get, set] |
TreeItemId wx.TreeCtrl.RootItem [get] |
The root node of the presented tree.
TreeItemId wx.TreeCtrl.Selection [get, set] |
Get or set the selection. The result will not be OK if nothing is selected.
uint wx.TreeCtrl.Spacing [get, set] |
ImageList wx.TreeCtrl.StateImageList [get, set] |
event EventListener wx.TreeCtrl.BeginDrag [add, remove] |
event EventListener wx.TreeCtrl.BeginLabelEdit [add, remove] |
event EventListener wx.TreeCtrl.BeginRightDrag [add, remove] |
event EventListener wx.TreeCtrl.DeleteItem [add, remove] |
event EventListener wx.TreeCtrl.EndDrag [add, remove] |
event EventListener wx.TreeCtrl.EndLabelEdit [add, remove] |
event EventListener wx.TreeCtrl.GetInfo [add, remove] |
event EventListener wx.TreeCtrl.ItemActivate [add, remove] |
event EventListener wx.TreeCtrl.ItemCollapse [add, remove] |
event EventListener wx.TreeCtrl.ItemCollapsing [add, remove] |
event EventListener wx.TreeCtrl.ItemExpand [add, remove] |
event EventListener wx.TreeCtrl.ItemExpanding [add, remove] |
event EventListener wx.TreeCtrl.ItemMiddleClick [add, remove] |
event EventListener wx.TreeCtrl.ItemRightClick [add, remove] |
override event EventListener wx.TreeCtrl.KeyDown [add, remove] |
Adds a listener to the wx.Event.wxEVT_KEY_DOWN.
Reimplemented from wx.Window.
event EventListener wx.TreeCtrl.SelectionChange [add, remove] |
event EventListener wx.TreeCtrl.SelectionChanging [add, remove] |
event EventListener wx.TreeCtrl.SetInfo [add, remove] |