ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Removed Areas > Delphi and C++ Builder

Another Question: State/Selection Images in TreeView

<< < (2/2)

app103:
Copied from Dephi 6 Help file:

TCustomTreeView.StateImages

Determines which image list to use for state images.

property StateImages: TCustomImageList;

Description

Use StateImages to provide a set of bitmaps that reflect the state of tree view nodes. The state image appears as an additional image to the left of the item's icon.
--- End quote ---

TCustomImageList is the base class for collections of same-sized images, each of which can be referred to by its index.

Unit

ImgList

Description

Image lists are used to efficiently manage large sets of icons or bitmaps. All images in an image list are contained in a single, wide bitmap in screen device format. An image list may also include a monochrome bitmap that contains masks that are combined with the images to produce a transparent effect such as is common in icons.
--- End quote ---

marylee:
Hello,

I'm using treeView1.ImageList not treeView1.StateImageList. However the images change..

marylee:
Ok, now I have the solution!
In the Add Method of the TreeNodes you cannot specify only the index of the image of the node, but also the image of the selectedNode!
tn.Nodes.Add("name", "Node Text", 1, 1);
 :)

Navigation

[0] Message Index

[*] Previous page

Go to full version