1.5k views
in GUI Development by

Is there a way to the background of this button?

It is from Application::ActionButtonIcons. There are options for green, white and shades of gray. 

Thanks.

1 Answer

0 votes
by

Hello,

first of all, the class Application::ActionButtonIcons is not part of the Mosaic framework - it seems to be an item (a GUI component) of your project.

I assume that you are using one of the provdided widgets, e.g. the Push Button widget. Please have a look to the section Customize your own Push Button in order to adapt your Push Button according your design ideas.

I hope this helps...

Best regards,

Manfred.

by

Thank you for your prompt answer. I was able to configure the push button to look like this:

I would like the background to be red by default and then when it is activated have it be gray. The icon "X" is working correctly where when selected it turns red. Here are my settings in PushButtonConfig.  Thanks again!

 

 

 

by

Hello,

currently you are trying to colorize one alpha-only bitmap with two different colors at the same time - which cannot work.

In your case, you can create colored images for the different states, e.g. one image with a green background and a gray border and one image with a red background and a dark gray X, ... These colored images can be separate images or you can arrange them as mulit-frame image.

Then you can assign these bitmap resources to the properties FaceDefault, FaceActive,... (without using the FaceTintDefault, FaceTintActive,... properties)... see section Specify bitmaps for the Push Buttons face image.

Please note, that there are two different ways of working with bitmaps in widgets: You can either use an alpha-only image, then you can colorize it (with one color) - or you can use colored images. See section Colored vs. alpha-only bitmaps (supported bitmap formats).

Best regards,

Manfred.

by
Thank you so much for your response. That worked perfectly. I used the second way you mentioned - set the png file as Format = Alpha and colorized dynamically.

Thanks again.

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...