AGW Logo

agw_title TreeTextCtrl

Control used for in-place edit.

This is a subclass of wx.lib.expando.ExpandoTextCtrl as CustomTreeCtrl supports multiline text items.

Note

To add a newline character in a multiline item, press Shift + Enter as the Enter key alone is consumed by CustomTreeCtrl to finish the editing and Ctrl + Enter is consumed by the platform for tab navigation.

hierarchy Inheritance Diagram

Inheritance diagram for: TreeTextCtrl

Inheritance diagram of TreeTextCtrl


method_summary Methods Summary

__init__Default class constructor.
AcceptChangesAccepts/rejects the changes made by the user.
FinishFinish editing.
OnCharHandles the wx.EVT_CHAR event for TreeTextCtrl.
OnKeyUpHandles the wx.EVT_KEY_UP event for TreeTextCtrl.
OnKillFocusHandles the wx.EVT_KILL_FOCUS event for TreeTextCtrl.
StopEditingSuddenly stops the editing.
itemReturns the item currently edited.

API Class API

class TreeTextCtrl(ExpandoTextCtrl)[source]

Control used for in-place edit.

This is a subclass of wx.lib.expando.ExpandoTextCtrl as CustomTreeCtrl supports multiline text items.

Note

To add a newline character in a multiline item, press Shift + Enter as the Enter key alone is consumed by CustomTreeCtrl to finish the editing and Ctrl + Enter is consumed by the platform for tab navigation.



__init__(owner, item=None)[source]

Default class constructor. For internal use: do not call it in your code!

Parameters:
Raise :

Exception when the item has an associated image but the parent CustomTreeCtrl does not have a wx.ImageList assigned.



AcceptChanges()[source]

Accepts/rejects the changes made by the user.

Returns:True if the changes to the item text have been accepted, False if they have been rejected (i.e., vetoed by the user).


Finish()[source]

Finish editing.



OnChar(event)[source]

Handles the wx.EVT_CHAR event for TreeTextCtrl.

Parameters:event – a wx.KeyEvent event to be processed.


OnKeyUp(event)[source]

Handles the wx.EVT_KEY_UP event for TreeTextCtrl.

Parameters:event – a wx.KeyEvent event to be processed.



OnKillFocus(event)[source]

Handles the wx.EVT_KILL_FOCUS event for TreeTextCtrl.

Parameters:event – a wx.FocusEvent event to be processed.


StopEditing()[source]

Suddenly stops the editing.



item()[source]

Returns the item currently edited.

Returns:An instance of GenericTreeItem.
Tree

Table Of Contents

Previous topic

TreeItemAttr

Next topic

customtreectrl functions