I am new at Gambas ... I have 3.12.2 and am going throught the getting started with Gambas 3.
The background color for the progressbar works fine, but the foreground will not change anything.
ForeGround color does not work from the properties box either.
I guess I am using the wrong command to set the color of the bar.
using the progressbar ... foreground color
- grayghost4
- Posts: 187
- Joined: Wednesday 5th December 2018 5:00am
- Location: Marengo, Illinois usa
using the progressbar ... foreground color
- Attachments
-
- bar color.png (59.78 KiB) Viewed 11127 times
Re: using the progressbar ... foreground color
Currently I would suggest something as this little example:
Private da As DrawingArea
Public Sub Form_Open()
ProgressBar1.Background = Color.Lighter(Color.Green)
da = ProgressBar1.Children[0]
Object.Attach(da, Me, "DA")
End
Public Sub DA_Draw()
With Paint
.Brush = .Color(Color.Yellow)
.Rectangle(0, 0, da.W * ProgressBar1.Value, da.H)
.Fill
.Brush = .Color(Color.Red)
.DrawText(Format(ProgressBar1.Value, "0.00"), da.W / 2, da.H / 2, 0, 0, Align.Center)
.End
End With
End
Public Sub Button1_Click()
Dim b As Byte
For b = 1 To 100
ProgressBar1.Value = b / 100
Wait 0.1
Next
End
Europaeus sum !
Amare memorentes atque deflentes ad mortem silenter labimur.
Amare memorentes atque deflentes ad mortem silenter labimur.
- cogier
- Site Admin
- Posts: 1129
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: using the progressbar ... foreground color
There does seem to be a bug here, I have reported it. I thought I could sort this by changing from gtk to qt4 but it makes no difference.
But there are many ways around this. Have a look at the attached.
But there are many ways around this. Have a look at the attached.
- grayghost4
- Posts: 187
- Joined: Wednesday 5th December 2018 5:00am
- Location: Marengo, Illinois usa
Re: using the progressbar ... foreground color
EDIT.
Cogier: your file does not download properly
I am glad you reported the error, thanks.
Now I don't have to keep trying to make it work.
Thanks to both of you for your responses.
The following was written before I saw your post.
Redrawing the progress bar is a little ahead of my learning curve
(I am not ready to build a watch, just need to know what time it is )
Blue will be just fine for now.
So the short answer is that the foreground color does not set the color of the progress bar.
Even though that is the instructions in John's book.
the compiler must have been changed since 2011
A Beginner’s Guide to Gambas Version 3 (this work) is copyright © 2005-2011
by John W. Rittinghouse
Cogier: your file does not download properly
I am glad you reported the error, thanks.
Now I don't have to keep trying to make it work.
Thanks to both of you for your responses.
The following was written before I saw your post.
Redrawing the progress bar is a little ahead of my learning curve
(I am not ready to build a watch, just need to know what time it is )
Blue will be just fine for now.
So the short answer is that the foreground color does not set the color of the progress bar.
Even though that is the instructions in John's book.
the compiler must have been changed since 2011
A Beginner’s Guide to Gambas Version 3 (this work) is copyright © 2005-2011
by John W. Rittinghouse
- cogier
- Site Admin
- Posts: 1129
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: using the progressbar ... foreground color
I am sorry you can't download the file. I just tried and it all worked perfectly?Cogier: your file does not download properly
I'll let you know what happens with the bug report.
- grayghost4
- Posts: 187
- Joined: Wednesday 5th December 2018 5:00am
- Location: Marengo, Illinois usa
Re: using the progressbar ... foreground color
The file did download .... firefox just gave me a warning that the file might be bad.
I will have a look at it .... thanks
I will have a look at it .... thanks
- Technopeasant
- Posts: 145
- Joined: Saturday 13th July 2019 6:50pm
- Location: Stony Plain, Alberta, Canada
- Contact:
Re: using the progressbar ... foreground color
Did you ever get a response on that bug report Cogier?
- cogier
- Site Admin
- Posts: 1129
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: using the progressbar ... foreground color
Nope! nothing. If you look at the mailing list in January 2019 here you will see it was ignored.Did you ever get a response on that bug report Cogier?
- Technopeasant
- Posts: 145
- Joined: Saturday 13th July 2019 6:50pm
- Location: Stony Plain, Alberta, Canada
- Contact:
Re: using the progressbar ... foreground color
Well, trouble is I guess that they care more about matching the system theme, over customizability. I guess it is either stick to blue or write a replacement. Just is annoying to have to sidestep a readily available control over styling.