Class | Fox::FXTreeListBox |
In: |
rdoc-sources/FXTreeListBox.rb
|
Parent: | FXPacker |
The Tree List Box behaves very much like a List Box, except that it supports a hierarchical, tree structured display of the items. When an item is selected it issues a SEL_COMMAND message with the pointer to the item. While manipulating the tree list, it may send SEL_CHANGED messages to indicate which item the cursor is hovering over.
The following messages are sent by FXTreeListBox to its target:
SEL_CHANGED: | sent when the current list item changes; the message data is a reference to the new tree item. |
SEL_COMMAND: | sent when the current list item changes; the message data is a reference to the new tree item. |
TREELISTBOX_NORMAL: | Normal style |
ID_TREE: | x |
ID_FIELD: | x |
currentItem | [RW] | Current item, if any [FXTreeItem] |
firstItem | [R] | First root-level item [FXTreeItem] |
font | [RW] | Text font [FXFont] |
helpText | [RW] | Status line help text for this tree list box [String] |
lastItem | [R] | Last root-level item [FXTreeItem] |
listStyle | [RW] | Tree list box style |
numItems | [R] | Number of items [Integer] |
numVisible | [RW] | Number of visible items [Integer] |
tipText | [RW] | Tool tip text for this tree list box [String] |
Return an initially empty FXTreeListBox.
p: | the parent window for this tree list box [FXComposite] |
target: | the message target, if any, for this tree list box [FXObject] |
selector: | the message identifier for this tree list box [Integer] |
opts: | tree list options [Integer] |
x: | initial x-position [Integer] |
y: | initial y-position [Integer] |
width: | initial width [Integer] |
height: | initial height [Integer] |
padLeft: | internal padding on the left side, in pixels [Integer] |
padRight: | internal padding on the right side, in pixels [Integer] |
padTop: | internal padding on the top side, in pixels [Integer] |
padBottom: | internal padding on the bottom side, in pixels [Integer] |
Append a new (possibly subclassed) item as last child of father. Returns a reference to the newly added item (an FXTreeItem instance). If notify is true, a SEL_INSERTED message is sent to the list‘s message target after the item is added.
Append item with given text and optional icons, and user-data pointer as last child of father. Returns a reference to the newly added item (an FXTreeItem instance). If notify is true, a SEL_INSERTED message is sent to the list‘s message target after the item is added.
Remove all items from the list. If notify is true, a SEL_DELETED message is sent to the list‘s message target before each item is removed.
Fill tree list box by appending items from array of strings and return the number of items added. If notify is true, a SEL_INSERTED message is sent to the list box‘s message target after each item is added.
Search items by text, beginning from item start. If the start item is nil the search will start at the first, top-most item in the list. Flags may be SEARCH_FORWARD or SEARCH_BACKWARD to control the search direction; this can be combined with SEARCH_NOWRAP or SEARCH_WRAP to control whether the search wraps at the start or end of the list. The option SEARCH_IGNORECASE causes a case-insensitive match. Finally, passing SEARCH_PREFIX causes searching for a prefix of the item text. Return nil if no matching item is found.
Search items by associated user data, beginning from item start. If the start item is nil the search will start at the first, top-most item in the list. Flags may be SEARCH_FORWARD or SEARCH_BACKWARD to control the search direction; this can be combined with SEARCH_NOWRAP or SEARCH_WRAP to control whether the search wraps at the start or end of the list. Return nil if no matching item is found.
Insert item with given text and optional icons, and user-data pointer under father before other item. Returns a reference to the newly added item (an FXTreeItem instance). If notify is true, a SEL_INSERTED message is sent to the list‘s message target after the item is added.
Insert a new (possibly subclassed) item under father before other item. Returns a reference to the newly added item (an FXTreeItem instance). If notify is true, a SEL_INSERTED message is sent to the list‘s message target after the item is added.
Prepend a new (possibly subclassed) item as first child of father. Returns a reference to the newly added item (an FXTreeItem instance). If notify is true, a SEL_INSERTED message is sent to the list‘s message target after the item is added.
Prepend item with given text and optional icons, and user-data pointer as first child of father. Returns a reference to the newly added item (an FXTreeItem instance). If notify is true, a SEL_INSERTED message is sent to the list‘s message target after the item is added.
Remove item. If notify is true, a SEL_DELETED message is sent to the list‘s message target before the item is removed.
Remove items in range [fromItem, toItem] inclusively. If notify is true, a SEL_DELETED message is sent to the list‘s message target before each item is removed.