Modify

Opened 16 years ago

Closed 16 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 by Valik, 16 years ago

Resolution: Wont Fix
Status: newclosed

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

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.