
Overlay 2 icons in ImageList control to assign to Treeview control node image
Ok, has anybody done this successfully? I have a pretty extensive compliment
of folder icons, in various colors and with different backgrounds to mean
different things. Now I need a way to have some of the nodes that are loaded
into a Treeview control to have their assigned folder checkmarked.... rather
than designing a whole new set of folders with the checkmark drawn on the
folder icon, I've been trying to use the overlay method of the ImageList
control to overlay a checkmark icon (that I loaded into the control at
design time, with white as the mask color) over the folder icon and then
assign the resulting ListImage name to the Image and ExpandedImage
properties of the node object.
Set imgX = Me!imgPictures.ListImages.Add(, "CHECK_GREEN" & Tag$ &
OpenFolder$, Me!imgPictures.Overlay(Tag$ & OpenFolder$, "CHECK_GREEN"))
nParentNode.SelectedImage = "CHECK_GREEN" & Tag$ & OpenFolder$
However, all I'm getting is the checkmark... it's like the mask isn't
working properly. The mask color, white in this case (I tried grey and a
custom color as well, changing the mask color setting in the control and
reloading the images with the appropriate background color to match), is
supposed to become transparent when the Overlay method is invoked, allowing
the icon being overlayed to show thru. Instead, I am ending up with a
checkmark on a white background in the tree. :-(
Ideas???? Does the ImageList Overlay method not work with Icons perhaps?
- Michael