Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Picture on ToolBar buttons
Message
From
27/05/2003 02:04:44
Dorin Vasilescu
ALL Trans Romania
Arad, Romania
 
 
To
26/05/2003 18:43:45
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00792897
Message ID:
00792956
Views:
13
From VFP help:

Using Picture Masks
Often, a .bmp picture contains white space you don't want to appear on your controls. A white border around an irregularly shaped image could make your control look bad. To avoid this problem, Visual FoxPro creates a temporary default mask for your picture. White areas are given a transparent attribute so that the underlying color of the button or background shows through. To keep certain white areas of your .bmp white, create a mask for it that will override the default.

To create a mask for a .bmp

Open the .bmp file in Paint or another bitmap utility.
Blacken all areas of the picture that you want to be displayed exactly as they are in the .bmp file. Leave the areas you want to be transparent as white.
Save the file in the same directory and with the same name as the .bmp file but with an .msk extension.
When Visual FoxPro loads a .bmp file specified by the Picture property for a command button, option button, or check box, it looks in the same directory for a matching .msk file. If an .msk file with the same name as the .bmp is in the directory, Visual FoxPro uses it as a mask for the picture. All white areas in the .msk picture are made transparent in the .bmp. All black areas in the .msk picture are displayed exactly as they are in the .bmp.

Note The .bmp picture and the .msk picture must have the same dimensions for the mask to be able to represent the area of the .bmp.

>I have created some pictures for my buttons on toolbar class, but when I put it on button the white color on pictures become grey (as color of buttons).
>
>How can I avoid that?
Previous
Reply
Map
View

Click here to load this message in the networking platform