button back color property
button back color property
I have been using gambas for couple years now. one thing bothers me. I can set color to something like a button but when I look it does not put that color on the design screen. It also does not put the color on the running program. everything is the standard grey button colors. Am I doing something wrong? I am on Fedora 28
- cogier
- Site Admin
- Posts: 1126
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: button back color property
Hi sadams and welcome to the forum.
This problem has popped up before. The first thing to try is to change the component gb.gui to gb.gtk3 and see if that does the trick for you.
Here is a little program that might help.
![Image](http://cogier.com/gambas/Buttons_colour.png)
This problem has popped up before. The first thing to try is to change the component gb.gui to gb.gtk3 and see if that does the trick for you.
Here is a little program that might help.
![Image](http://cogier.com/gambas/Buttons_colour.png)
Re: button back color property
It is not always good to limit an app to a certain version of a certain widgetset. If so, it should not be to hard to code a custom button component. If you are really lazy, you could perhaps even use a panel to simulate a button ![Cool 8-)](./images/smilies/icon_cool.gif)
![Cool 8-)](./images/smilies/icon_cool.gif)
Re: button back color property
You could for example look at my vertical progress bar at the Gambas farm for an easy start with component writing...
Re: button back color property
Or even this one
viewtopic.php?f=6&t=12
viewtopic.php?f=6&t=12
- cogier
- Site Admin
- Posts: 1126
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: button back color property
You have a point jornmo but after some messing about I thought that a Label has everything you need so here is another solution, this time not requiring 'gb.gtk3'
![Image](http://cogier.com/gambas/Colour_Button.jpg)
![Image](http://cogier.com/gambas/Colour_Button.jpg)
Re: button back color property
Here's my take with a custom component. Just a humble beginning. Needs some refinement ![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
Re: button back color property
This was a littlebit fun ![Smile :)](./images/smilies/icon_e_smile.gif)
Here's a somewhat more refined version, but still lacking here and there. I'm struggling to get the defaults to work. You need to set Color1, Color2 and Foreground for now.
![Smile :)](./images/smilies/icon_e_smile.gif)
Here's a somewhat more refined version, but still lacking here and there. I'm struggling to get the defaults to work. You need to set Color1, Color2 and Foreground for now.
Re: button back color property
Jornmo answered it. changing to the gtk did the trick perfectly. Not sure why the rest of the convo is going so out there....
Re: button back color property
Whaaaat an insult!!!
![Laughing :lol:](./images/smilies/icon_lol.gif)
Btw., it was cogier who told about the GTK solution.
![Surprised :o](./images/smilies/icon_e_surprised.gif)
![Surprised :o](./images/smilies/icon_e_surprised.gif)
![Surprised :o](./images/smilies/icon_e_surprised.gif)
![Cool 8-)](./images/smilies/icon_cool.gif)
![Laughing :lol:](./images/smilies/icon_lol.gif)
Btw., it was cogier who told about the GTK solution.