Balloons

Post Reply
User avatar
cogier
Site Admin
Posts: 517
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Balloons

Post by cogier » Saturday 29th August 2020 2:03pm

Can anybody tell me how to change the background and foreground on Balloon?

Running the following code produces dark grey text on a black background.
Public Sub Form_Open()
  
  Balloon.Info("Hello World!", Button1)
  
End

cage
Posts: 81
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: Balloons

Post by cage » Saturday 29th August 2020 6:22pm

Can anybody tell me how to change the background and foreground on Balloon?
As far as I can find out they are suppose to be linked to the color of the system notification colors. I tested out that theory and found it not to be true. Also I have not found any setting in Gambas preferences that change the color that works either. You might want to ask the author of Gambas to see if there is a work around. Sorry I wasn't any help.

vuott
Posts: 45
Joined: Wednesday 05th April 2017 6:07pm

Re: Balloons

Post by vuott » Saturday 29th August 2020 10:26pm

cogier wrote:
Saturday 29th August 2020 2:03pm
Running the following code produces dark grey text on a black background.
...you are using GTK, aren't you ? ;)
Change graphic resource: use QT.

Obviously, then, you know that you can use the HTML protocol with the text of the "Ballon" ...

User avatar
grayghost4
Posts: 70
Joined: Wednesday 05th December 2018 5:00am
Location: Concord, CA usa

Re: Balloons

Post by grayghost4 » Sunday 30th August 2020 5:35am

My balloon text is white on black
but you can use this to make it more visible

Balloon.Font = Font["Arial,18,Bold,italic"]

User avatar
cogier
Site Admin
Posts: 517
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Balloons

Post by cogier » Sunday 30th August 2020 9:48am

As far as I can find out they are suppose to be linked to the color of the system notification colors.
Thanks cage, I also looked for these settings but all I was able to do was read what they are and not set them.
My balloon text is white on black
but you can use this to make it more visible

Balloon.Font = Font["Arial,18,Bold,italic"]
Thanks grayghost4 but that doesn't change the colour.
..you are using GTK, aren't you ? ;)
Change graphic resource: use QT.
Thank vott, you are correct the colours are fine with QT but why not with GTK?

User avatar
grayghost4
Posts: 70
Joined: Wednesday 05th December 2018 5:00am
Location: Concord, CA usa

Re: Balloons

Post by grayghost4 » Sunday 30th August 2020 6:10pm

But changing to QT requires a major rewrite of the program :(

That is probably because I don't write the program correctly

vuott
Posts: 45
Joined: Wednesday 05th April 2017 6:07pm

Re: Balloons

Post by vuott » Sunday 30th August 2020 10:40pm

cogier wrote:
Sunday 30th August 2020 9:48am
Thank vott, you are correct the colours are fine with QT but why not with GTK?
It is the normal coloring of Ubuntu tooltips by using GTK.

User avatar
BruceSteers
Posts: 156
Joined: Thursday 23rd July 2020 5:20pm

Re: Balloons

Post by BruceSteers » Thursday 08th October 2020 3:20pm

I've been monkeying around with the Gambas source code.

My first test ,, try to add Background and Foreground to Balloon object :)
Successfully accomplished :)
i can now use something like
Balloon.Background = Color.Blue
Balloon.Foreground = Color.Yellow
and it works fine , by default it uses the Color.TooltipBackground and Color.TooltipForeground values as normal

Now i need to figure out how to add the changes for all......

:)
If at first you don't succeed , try it differently.

User avatar
BruceSteers
Posts: 156
Joined: Thursday 23rd July 2020 5:20pm

Re: Balloons

Post by BruceSteers » Thursday 08th October 2020 5:59pm

Well i think i did everything right.
I've created my own gitlab account , forked my own version of gambas.
added the Balloon colour changes, committed it to my fork.
and sent a merge request.

With any luck Charlie you'll have Balloon colour settings at some time or other :)
https://gitlab.com/bsteers4/gambas
If at first you don't succeed , try it differently.

Post Reply