Hi All,
1. Answer to the original question
I already had that trouble and found a solution. Of course, I do not remember
what it was, but I will search right now.
<after the quest>
As far as I can tell, once I created a Mask, I get the desired behavior.
Explanation:
a. Load the icon from file
b. Create a mask for that Icon [every non white pixel (in the loaded Icon) is
set to black (in the Mask Icon)]
c. Use:
IconPict.Mask.Graphics.DrawPicture GeneratedMask,0,0
and you are done.
Nota: to create the Icon Mask, use two nested loops and a RGBSurface Instance to
read / write the Pixel.
You can find nearly all the code in the RBNUG thread called: "Why is this a Nil
Object"; I share 95% of the code you need there. You have to put some Dim and
the part that read the color in the original Icon and write the Black in the
Mask icon (so you need to create a mask picture and return it once it is done).
At last, there is a max width / height you have to respect in the original (thus
in the Mask) Icon. I do not remember, but 32 x 32 seems a good size.
Now, if everything goes well, you will be able to have only the Icon highlighted
when you press the mouse on it !
This is only for custom loaded Icons. The build-in Icons works already like
that. You have nothing special / fancy to do ;)
2. Answer to the below text
---------------------------
Did you read the pdf documentation ? Especially the Language Reference, Picture
Class ?
<quote>
Picture.Transparent Property
Syntax
Transparent as Integer
Controls the transparency of the white 'layer' of the picture.
0 - Not transparent.
1 - White is transparent.
</quote>
HTH,
Emile
[EMAIL PROTECTED] wrote:
Subject: RE: Transparent Icons in ToolbarItems?
From: "Dixon, Tom" <[EMAIL PROTECTED]>
Date: Sat, 4 Feb 2006 10:28:50 -0600
Not to my knowledge at this time. I believe there have been feature
requests filed to support transparency natively in .png files. You can
search and add your vote for any you find.
Out of curiosity, does Realbasic support transparency in=20
images without adding Masks?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>