Modify ↓
Opened 14 years ago
Closed 14 years ago
#1722 closed Bug (No Bug)
GUICtrlSetStyle() and $BS_DEFPUSHBUTTON
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.6.0 | Severity: | None |
Keywords: | Cc: |
Description
Opt("GUIOnEventMode", 1) $g = GUICreate("gui") $i = GUICtrlCreateInput("",2,2) $b = GUICtrlCreateButton("click me",220,2) GUICtrlSetStyle($b, 0x50034001);defpushbutton GUICtrlSetOnEvent($b, "_button") GUISetOnEvent(-3, "_Close") GUISetState() While 1 Sleep(100) WEnd Func _button() MsgBox(0,"","Yay!") EndFunc Func _Close() Exit EndFunc
The button event should be triggered whenever I press the enter key but it isn't.
It works if I set the defpushbutton style in the GUICtrlCreateButton() function but I need to set reset the style many times in my script (when the first style is not $BS_DEFPUSHBUTTON).
Attachments (0)
Change History (1)
comment:1 Changed 14 years ago by Valik
- Resolution set to No Bug
- Status changed from new to closed
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.
Note: See
TracTickets for help on using
tickets.
This is not a bug. You need support so either use the forum, or more appropriately, Google. It took me about 3 minutes to find a working solution for changing the default button in a dialog.