Jump to content

GUICtrlSetBkColor color in black


trescon
 Share

Recommended Posts

Good evening, I need to configure a graphical interface where the contents of some "Button" are taken from a file I have foreseen to include with "#include".
For the text no problem, the problem comes when I'm going to assign the color to the background of the "Button", the "Button" becomes BLACK WHITE.
I included in the included file as follows:

$ Promotion_Color = "$ Color_Red"

Clarity I also imported #include the library <ColorConstants.au3>

In the main program I wrote like this:

$ Promotion = GUICtrlCreateButton ($ Promotion, Dim_Fin_X + $ 170, $ Dim_Fin_Y, 750.120)
GUICtrlSetFont (-1, 70, 800, 0, "Calibri")
GUICtrlSetBkColor ($ Promotion, $ Promotion_Color); will change background color

I thank all those who want to help me

Alberto

Edited by trescon

Thank You

Alberto

---------------------------------------------------

I am translate with Google.

Link to comment
Share on other sites

Hi.

I guess your problem above is because the quotation marks. Try:

$Promotion_Color = $Color_Red

By the way in your code above you have spaces between the $ and the rest of the variable.

This is not correct: $ Promotion_Color = 

This is correct: $Promotion_Color = 

Conrad

Edited by Simpel
SciTE4AutoIt = 3.7.3.0   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win_10   Build = 19044   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE     H:\...\AutoIt3      H:\...\AutoIt3\Include     (H:\ = Network Drive)

   88x31.png  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.

Link to comment
Share on other sites

1 hour ago, Simpel said:

Hi.

I guess your problem above is because the quotation marks. Try:

$Promotion_Color = $Color_Red

By the way in your code above you have spaces between the $ and the rest of the variable.

This is not correct: $ Promotion_Color = 

This is correct: $Promotion_Color = 

Conrad

Space has put it google during translation, in real code there is no.

Thanks anyway

Thank You

Alberto

---------------------------------------------------

I am translate with Google.

Link to comment
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
 Share

×
×
  • Create New...