Creates a TreeView control in the current active form, window, or dialog.
TreeViewCtrl text$, id%, x, y, w, h[, style%]
text$:control text
id%:control identifier
x,y,w,h:iexp
style%:the control styles
The TreeView control is designed to display data that is hierarchical in nature, such as organization trees, the entries in an index, the files and directories on a disk. Each item consists of a label and an optional bitmapped image, and each item can have a list of subitems associated with it. By clicking an item, the user can expand or collapse the associated list of subitems.
The command creates a control without an OCX wrapper; so it and cannot be handled using properties, methods, and event subs. When used in a form the WM_NOTIFY message should be handled in the form's _MessageProc sub.
Form frm
TreeViewCtrl "", 10, 20, 20, 150, 200
Do
Sleep
Until Me Is Nothing
Sub frm_MessageProc(hWnd%, Mess%, wParam%, lParam%, retval%, ValidRet?)
Dim hdr As Pointer NMHDR
Switch Mess
Case WM_NOTIFY
Pointer(hdr) = lParam
Print hdr.idfrom
EndSwitch
EndSub
Type NMHDR
hwndFrom As Long
idfrom As Long
code As Long
EndType
This command is particular useful for a dialog box in a GLL, because a GLL doesn't support OCX controls.
With the general Control statement any control type can be created.
Control, AnimateCtrl, AutoCheckBox, AutoRadioButton, CheckBox, ComboBox, CText, Dialog, DefPushButton, EditText, GroupBox, HeaderCtrl, ListBox, ListViewCtrl, LText, ProgressCtrl, PushButton, RadioButton, RichEditCtrl, RText, ScrollBar, StatusCtrl, TabCtrl, ToolBarCtrl, TrackBarCtrl, TreeViewCtrl, UpDownCtrl
{Created by Sjouke Hamstra; Last updated: 25/10/2014 by James Gaite}