How Do I Set Icons for the Tree Nodes? (Magic xpa 4.x)
|
|
Without icons
|
With icons
|
You can choose whether or not to use icons on your Tree control.
The tree has four states:
-
Expanded image: When a node is fully expanded, or has no children.
-
Collapsed image: When a node is collapsed.
-
Parked expanded image: When the cursor is parked on an expanded node.
-
Parked collapsed image: When the cursor is parked on a collapsed node.
Each of these icons is set by specifying a number, which is an index into the icon file. If the index is set to zero, then no image will appear on a node in that state.
Prerequisite: You need to have an icon file. An icon file is a bitmap file with a series of icons in it. You will select which icons you want by number. There are icon files available for purchase, or you can design your own.
-
Select the Tree control.
-
Go to Control Properties -> Image List file name.
-
Zoom to select the image file, or type in the name.
-
Now, for each of the four states, Zoom to select the icon you want from the image file.
You can find an example icon file at %EngineDir%MGresrc.Toolbar_Images
The Online and Rich Client Samples projects (program TR03 and RTR03)