Purpose |
To insert a hierarchical tree. |
Syntax |
winio@('%N.Mtv[options]', tree, nitems, sel) |
Modifiers |
Grave accent (`) - for programmer supplied icons. Caret (^) - call-back function that is called when the user selects an item. |
Description |
This format has been superseded by %bv (Branch View). For new code consider using %bv instead. N and M are not optional and specify the width and depth of the area in average characters. tree is a character array of nitems. sel is the index of the item selected by the user. icon_str is a character string giving a list of icon resources in the form 'icon1,icon2'. options can take the keyword fixed_font which causes the control to use a fixed font for the names of the tree nodes. This can be useful in cases where the node names are intended to line up. options can also take the keyword keep_focus to prevent the focus from shifting from the selected item. This is similar to the effect produced by a list box. If variable_size is included as one of the options, nitems is treated as a variable that subsequently can be modified and updated by a call to WINDOW_UPDATE@. However, the size cannot be increased above its initial value. Since blank elements in the input array are ignored, the only reason to use this feature is to reduce the processing time (and therefore possible flicker) when using a very large array, most of whose elements are blank. For further details see Tree-view. |
Notes |
Icon resource names can be constructed from known Windows (integer kind=7) handles (see Using the handle of a resource). |
Example |
winio@('%^`20.16tv',tree,15L,sel,'cl_book,op_book',cb) cl_book ICON book1.ico (resource file) op_book ICON book2.ico |
See also |
%bv (Branch View), %ls (List Box (or Combo Box)), %ms (Multi-select Box), %pb (Parameter Box), %ps (Property Sheet Container), SEE_TREEVIEW_SELECTION@ |