Solved

Transparent  and treeview

Posted on 2001-07-05
7
963 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
7 Comments
 
LVL 3

Accepted Solution

by:
TheRedGuy earned 50 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now