Ask Your Question
0

How to change background color for button during runtime?

asked 2018-10-13 17:04:07 +0200

shma_lo gravatar image

When I try to change button background color by, for example, MyDialogue.GetControl("MyButton").getModel.BackgroundColor = RGB(200,200,200) the button doesn't change its color. Button's borders get new color only.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2019-03-02 18:49:44 +0200

musikai gravatar image

On Linux try this for your dialog:

MyDialogue.getPeer().setProperty( "NativeWidgetLook", False )

edit flag offensive delete link more

Comments

@musikai Thanks for the code. Works for me.

Ratslinger gravatar imageRatslinger ( 2019-03-02 19:17:25 +0200 )edit
0

answered 2018-10-14 06:02:31 +0200

Ratslinger gravatar image

Hello,

Please specify OS & LO version when posting.

In testing (Mint 18.3 with LO v6.1.0.3), I get no change at all - not even border. Can change dialog background though.

Went in to original dialog & set background color for buttons (3 on my test) & in desing mode they are colored in but have no color when the dialog is run.

This is a Bug & you should report it. Did a quick review and did not see one specifically for this.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-10-13 17:04:07 +0200

Seen: 82 times

Last updated: Mar 02