Modify

Opened 15 years ago

Closed 15 years ago

#1504 closed Bug (Wont Fix)

GUICtrlSetBkColor sets button style to $BS_DEFPUSHBUTTON

Reported by: SEuBo Owned by:
Milestone: Component: AutoIt
Version: 3.3.4.0 Severity: None
Keywords: Cc:

Description

Hello,

When GUICtrlSetBkColor is used on a button, it "steals" the focus.
Run the script below.
Type something into the input, and confirm by pressing Enter.
Everything works fine.

Now click the Button, and type something into the Input. After that, press Enter.

By watching the Console input you will notice, that the button event is now fired, everytime you hit enter.

This is exactly, what $BS_DEFPUSHBUTTON is doing, isn't it?
I guess this is not intended behaviour.

$hGUI = GUICreate("")
$cInput = GUICtrlCreateInput("", 20, 20, 50, 20)
$cDelete = GUICtrlCreateButton("x", 20, 50, 50, 20)
GUICtrlSetBkColor(-1, 0xAAAAAA)
GUISetState()

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case -3
			Exit
		Case $cDelete
			ConsoleWrite("Delete" & @CRLF)
		Case $cInput
			ConsoleWrite("Input" & @CRLF)
	EndSwitch
WEnd

Tested on Vin Wista x86.

Attachments (0)

Change History (1)

comment:1 Changed 15 years ago by Valik

  • Resolution set to Wont Fix
  • Status changed from new to closed

It's good to see you searched the issue tracker before wasting our time. Closing as won't fix just like the identical #376.

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 ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.