?
Solved

Transparent  and treeview

Posted on 2001-07-05
7
Medium Priority
?
973 Views
Last Modified: 2008-02-01
Hi EEs:

This is the scenario:

I have a treeview and imagelist controls.
Imagelist is loaded with transparent gifs images.

Why those images haven't transparent background when are seeing on treeview?

Thanks

0
Comment
Question by:Richie_Simonetti
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 3

Accepted Solution

by:
TheRedGuy earned 200 total points
ID: 6258888
Dunno, can you not just convert the gifs to icons?
0
 
LVL 3

Expert Comment

by:CesarGon
ID: 6259000
You have to set the ImageList's MaskColor property to the color in your GIF images you want to see as "transparent" when used on the TreeView. It won't take the transparency settings of the GIF files.

Best,
Cesar.
0
 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6259014
What colour is the background when they are in the TreeView ?

If it always the same then in your image list control
in the Color tab change the mask color to the color of the background.

Hope this helps
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6259086
In your ImageList load the gif images and set the mask color to the background color that it appears as in the imagelist (usually black). Make sure the UseMaskColor option is checked.

The pictures should now appear as transparent in your TreeView.

Vin.
0
 
LVL 16

Author Comment

by:Richie_Simonetti
ID: 6259462
Well, i already tried Usemaskcolor property without solve the problem.
VincentLawlor, i would reject your answer until i have received more input from others EE.

At the momment of posting question, i had this:
All Gif background are &HFF00FF (Nice color, isn't it?) and all are 256 color depth, loaded to imagelist at design time.
Maskcolor = &HFF00FF
UseMaskColor=true

By the way, i am working with those controls from within VBA.

Thanks for yours comments, i am waiting...
0
 
LVL 16

Author Comment

by:Richie_Simonetti
ID: 6259838
TheRedGuy, your comment is close enought.
I would like to know why it doesn't works with gif.
0
 
LVL 16

Author Comment

by:Richie_Simonetti
ID: 6261579
I don't like to use BMPs simbce they are so heavy. I was using gif instead for that reason.
Ico files are less weight than BMP and it works.
TheRedGuy you have the answer. Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month12 days, 23 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question