button back color property

Post

Posted
Rating:
#1 (In Topic #179)
Avatar
Enthusiast
sadams54 is in the usergroup ‘Enthusiast’
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
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
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.

<IMG src="http://cogier.com/gambas/Buttons_colour.png"> </IMG>

Attachment
Online now: Yes Back to the top

Post

Posted
Rating:
#3
Avatar
Regular
jornmo is in the usergroup ‘Regular’
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  8-)

Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Regular
jornmo is in the usergroup ‘Regular’
You could for example look at my vertical progress bar at the Gambas farm for an easy start with component writing...

Online now: No Back to the top

Post

Posted
Rating:
#5
Online now: No Back to the top

Post

Posted
Rating:
#6
Avatar
Guru
cogier is in the usergroup ‘Guru’
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'

<IMG src="http://cogier.com/gambas/Colour_Button.jpg"> </IMG>

Attachment
Online now: Yes Back to the top

Post

Posted
Rating:
#7
Avatar
Regular
jornmo is in the usergroup ‘Regular’
Here's my take with a custom component. Just a humble beginning. Needs some refinement :)

Attachment

Online now: No Back to the top

Post

Posted
Rating:
#8
Avatar
Regular
jornmo is in the usergroup ‘Regular’
This was a littlebit fun :)
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.

Attachment

Online now: No Back to the top

Post

Posted
Rating:
#9
Avatar
Enthusiast
sadams54 is in the usergroup ‘Enthusiast’
Jornmo answered it. changing to the gtk did the trick perfectly. Not sure why the rest of the convo is going so out there....
Online now: No Back to the top

Post

Posted
Rating:
#10
Avatar
Regular
jornmo is in the usergroup ‘Regular’
Whaaaat an insult!!!  :o  :o  :o  

 8-)  :lol:

Btw., it was cogier who told about the GTK solution.

Online now: No Back to the top
1 guest and 0 members have just viewed this.