Overlay 2 icons in ImageList control to assign to Treeview control node image 
Author Message
 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



Fri, 26 Mar 2004 00:53:41 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem with TreeView control Nodes and assigning objects to Tag property

2. HOWTO: Prevent flicker in TreeView control when changing the .Image property of a Node object

3. HOWTO: Prevent flicker in TreeView control when changing the .Image property of a Node object

4. HOWTO: Prevent flicker in TreeView control when changing the .Image property of a Node object

5. Assigning an image to an image control

6. Overlay Images & Control Each

7. Image Overlay / Object Window control

8. Can't assign imagelist to treeview at runtime

9. Assign Sys ImageList to TreeView in VB

10. Assign Sys ImageList to TreeView in VB

11. Assign Sys ImageList to TreeView in VB

12. Node disappears from TreeView after Parent property assigned

 

 
Powered by phpBB® Forum Software