Navigation: thinBasic Modules > UI (User Interface) > CONTROLs > Dedicated Control Functions > TreeView Control > TreeView_InsertItem |
|
Description
Insert a new data item into a TreeView control.
Syntax
hItem = TreeView_InsertItem(hWnd, ctrlID, hParent, hAfter, Image, ImageSel, sText)
Returns
Number
If the operation is successful, the handle to the new data item is returned.
If the operation fails, the value zero is returned.
Parameters
Name |
Type |
Optional |
Meaning |
hWnd |
Number |
No |
Handle of the dialog containing the list-view control |
ctrlID |
Number |
No |
Control identifier assigned to the control during CONTROL ADD ... |
hParent |
Number |
Specifies the parent of this item, or zero if item is to be inserted at the root |
|
hAfter |
Number |
Specifies the handle of the item after which this new item is to be inserted. Use the following equates for special positions: %TVI_FIRST to insert new item at the beginning %TVI_LAST to insert new item at the end %TVI_SORT to insert new item in alphabetical order |
|
Image |
Number |
Number |
If an ImageList has been attached to the control, this parameters specify which image should be displayed (1=first, 2=second, etc.) for normal items. If no image is needed, the value(s) 0 should be used. |
ImageSel |
Number |
Number |
If an ImageList has been attached to the control, this parameters specify which image should be used for selected items. If no image is needed, the value(s) 0 should be used. |
sText |
String |
No |
The text string to insert into the control |
Remarks
Restrictions
See also
Examples
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |