Setting button background colour on toolbar buttons... 
Author Message
 Setting button background colour on toolbar buttons...

Hi,

I've been using toolbars for a while in vb5 but I've never been able to
work out how to set the background colour of a toolbar button to the
system default.

For example, if I create a load of images to put on the buttons, I save
them as bmps (16 pixels by 16 pixels by 16 colours) with a grey
'background' around them.  I then insert them in my toolbar and when the
system default toolbar colour is light grey, everything looks fine.
However, when I change the default colour, say use the 'Slate' or
'Spruce' desktop colour schemes the toolbar change colour but the images
on the buttons still have a grey background.  

I tried setting the MaskColor property of the imagelist to the system
default but this didn't seem to do anything.

How can I create a toolbar whose button backgrounds change colour with
the system?  Eg. the toolbars in Word or VB.

TIA,
Cheers,
--
Andy Bibby
ADG Computer Systems Ltd
Oxford, UK.



Fri, 21 Jan 2000 03:00:00 GMT  
 Setting button background colour on toolbar buttons...

Andy:

      I've been throught de same situation and I can tell you how I did
it right:

VB5 ships with ImageEdit, a little program that let's you edit Icons and
bitmaps. When you edit icons with it, it has a special color, 'screen',
that is transparent to the background color, no matter wich color is it.

When you have done your icons. Open the properties of your button, and
in the picture property, add the proper icon. Then, in the background
color property, select the 'System' tab, then chose 'Button Face'. Your
icon well be melded with your button.

I hope this serve you.

Federico Cirett
=)



Sun, 30 Jan 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Toolbar Button background Color - How to set?

2. Open a custom form with a module-button (not a toolbar button)

3. Toggle Button Effect on Toolbar Button

4. How to set the spacing on toolbar button.

5. Q: Can't set H.and W. for Buttons in Toolbar

6. Toolbar Button Setting Programmatically

7. Clipped Toolbar Buttons When Setting Form Size

8. Toolbar button : can't set image from ImageList

9. how to set a toolbar button property ?

10. How to set the spacing on toolbar button.

11. How to set the spacing on toolbar button.

12. How to set the spacing on toolbar button.

 

 
Powered by phpBB® Forum Software