Modify

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#182 closed Feature Request (Completed)

Add GUISetColor() by analogue of GUISetFont()

Reported by: MsCreatoR <mscreator@…> Owned by: Jpm
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 Changed 12 years ago by TicketCleanup

  • Milestone Future Release deleted
  • Version 3.2.10.0 deleted

Automatic ticket cleanup.

comment:2 Changed 12 years ago by Jpm

  • Milestone set to 3.2.11.5
  • Owner set to Jpm
  • Resolution set to Completed
  • Status changed from new to closed

Added in version: 3.2.11.5

comment:3 Changed 11 years ago by dickyou@…

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 Changed 11 years ago by Jpm

  • Severity set to None

Use the forum first on a close ticket.
Just look at the doc under GUICtrlSetDefColor and GUICtrlSetDefBkColor

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jpm.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.