#182 closed Feature Request (Completed)
Add GUISetColor() by analogue of GUISetFont()
| Reported by: | Owned by: | J-Paul Mesnage | |
|---|---|---|---|
| Milestone: | 3.2.11.5 | Component: | AutoIt |
| Version: | Severity: | None | |
| Keywords: | Color GUI Set | Cc: |
Description
GUISetFont cover all controls that will be created and set Font for them, i believe we need the same but with the Color.
Syntax:
GUISetColor(textcolor[, winhandle])
Example:
#include <GuiConstants.au3>
Global $GUI_BK_COLOR = 0x000000 ;This value changes via IniRead
GUICreate("Test Script")
GUISetBkColor($GUI_BK_COLOR)
GUISetColor(0x000000)
If $GUI_BK_COLOR = 0x000000 Then GUISetColor(0xFFFFFF) ;to adapt the controls color to the window color
GUICtrlCreateLabel("Some text", 20, 40)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Purpose:
We creating the gui and set the Background, but now we need to create a lot of controls, they needs to be adapdet to the background color of the window. This function will avoid the need to set color for every control.
Thanks!
Attachments (0)
Change History (4)
comment:1 by , 18 years ago
| Milestone: | Future Release |
|---|---|
| Version: | 3.2.10.0 |
comment:2 by , 18 years ago
| Milestone: | → 3.2.11.5 |
|---|---|
| Owner: | set to |
| Resolution: | → Completed |
| Status: | new → closed |
Added in version: 3.2.11.5
comment:3 by , 17 years ago
Ahm, I'm currently using v3.3.0.0, but this functionality is NOT there...
Would be nice to have more info why it vanished, or how it's called in current version
comment:4 by , 17 years ago
| Severity: | → None |
|---|
Use the forum first on a close ticket.
Just look at the doc under GUICtrlSetDefColor and GUICtrlSetDefBkColor

Automatic ticket cleanup.