[Gambas-devel] BUG (in gb.qt?) Button.Background

Patrik Karlsson patrik at ...603...
Thu Jun 26 15:24:06 CEST 2008


2008/6/26 Benoit Minisini <gambas at ...1...>:
> On jeudi 26 juin 2008, Patrik Karlsson wrote:
>> _Gambas 2.7_
>>
>> Hello,
>> I have noticed a problem when trying to change the color of a button
>> in run time.
>>
>> When I place a button on a form at design time, I'm able to change its
>> color, but trying to change during run time will not work.
>> I added this
>>
>> PUBLIC SUB Form_Open()
>>   DIM hBut AS NEW Button(ME)
>>   hBut.BackColor = Color.Red
>> END
>>
>> At program start, I can see the button flash in red, and after that,
>> return to default color.
>> The button made with design gets to keep its color.
>>
>>   { Button1 Button
>>     MoveScaled(5,15,16,3)
>>     Background = &HFF21C4&
>>     Text = ("Button1")
>>   }
>>
>> When I make this project a gb.gtk, it is all ok.
>
> Which KDE widget style do you use? Can you check that you have the same
> behaviour with another KDE widget style?
>
> --
> Benoit Minisini
>

This is interesting.
I had the defalut QtCurve in Kubuntu Hardy. I got somewhat different
behaviour when change between other styles.
Plastic was thes best, a clicked red button became dark red.

What does this mean?
Is the problem outside of Gambas? If so, how come setting the color
in design mode works, and run time does not?


-- 
Patrik Karlsson




More information about the Devel mailing list