ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / How to proceed? / Programming
  • Method
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
When fillilng a TreeView control, an image is associated with each element. It is a small symbol representing an opened or closed folder. Indeed, each level and each element of the treeview can be:
  • collapsed (image of closed folder by default).
  • expanded (image of opened folder by default).
These images can be modified programmatically.
Note: You can also change the default image for the elements in a TreeView control with the CollapsedImage and ExpandedImage properties.
Method
To modify the images representing the collapsed or expanded element, the desired images must be specified in TreeAdd and TreeInsert.
The syntax of the TreeAdd function is as follows:
TreeAdd(<TreeView name>, <Element>, <Name of collapsed image>, <Name of expanded image>)
Code sample:
TreeAdd(TREE_Product, "Man", "M1.jpg", "M2.jpg")
TreeAdd(TREE_Product, "Woman", "W1.jpg", "W2.jpg")


TreeAdd(TREE_Product, "Man" + TAB + "Trousers", "trousers.JPG", "trousers.JPG")
TreeAdd(TREE_Product, "Man" + TAB + "Jacket", "jacket.JPG", "jacket.JPG")
TreeAdd(TREE_Product, "Man" + TAB + "Shoes", "shoesM.JPG", "shoesM.JPG")
TreeAdd(TREE_Product, "Woman" + TAB + "Dress", "dress.JPG", "dress.JPG")
TreeAdd(TREE_Product, "Woman" + TAB + "Pullover", "pullover.JPG", "pullover.JPG")
TreeAdd(TREE_Product, "Woman" + TAB + "Shoes", "shoesW.JPG", "shoesW.JPG")
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/23/2024

Send a report | Local help