Sign in to follow this  
Followers 0
andygo

[SOLVED] Bug in Autoit?

3 posts in this topic

#1 ·  Posted (edited)

Hello,

maybe this is a bug or i should take a creative-break for a while...

this is the situation:

with

$b1 = GuiCtrlCreateButton("Test", 20, 20, 100, 20)
GuiCtrlSetbkColor($b1, 0x12e3db)

i create a blue-colored button. works fine.

now, with a function, i set the button back to the basic-style:

GUICtrlSetStyle($b1, $GUI_SS_DEFAULT_BUTTON)

works also fine.

if i now try to set the text-color, text changes to red. but the backgroundcolor would also be changed to the first (blue) value.

GuiCtrlSetColor($b1, 0xff0000)

those two actions should be independent to each other, shouldnt they?

it drives me realy crazy.... please help....

Edited by andygo

Share this post


Link to post
Share on other sites



Setting the style does not change the underlying background color, it just overrides it because the bk color cannot be shown with the default style. Once you try to set the text color, the button style is changed to the custom style again where you have the old bk color already set. You'll notice if you just set the text color on the button (and not the bk color) that the bk color and style change anyway.

Share this post


Link to post
Share on other sites

wraithdu, thanks very much. your explanation is plausible to me, i now unterstand the situation.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0