amokoura Posted June 13, 2008 Share Posted June 13, 2008 (edited) By using GUICtrlSetBkColor() on a button causes it to catch enter key.More info: http://svn.autoitscript.com/trac/ticket/376Note: Bug appears only in 3.2.12.x Edited June 14, 2008 by amokoura Link to comment Share on other sites More sharing options...
ResNullius Posted June 14, 2008 Share Posted June 14, 2008 Looks like this behaviour might be a by-product of trying to fix an old (unfixable?) bug...http://www.autoitscript.com/forum/index.php?showtopic=46170The example I posted there now seems to work the way it should , but obviously now has the problem you pointed out Link to comment Share on other sites More sharing options...
martin Posted June 14, 2008 Share Posted June 14, 2008 By using GUICtrlSetBkColor() on a button causes it to catch enter key. More info: http://svn.autoitscript.com/trac/ticket/376Only if you have the one button. If you do this the effect disappears. #include <GUIConstants.au3> GUICreate("Form1", 166, 189, 234, 191) GUICtrlCreateInput("Input1", 16, 8, 121, 21) $Button1 = GUICtrlCreateButton("Button1", 16, 40, 123, 25, 0) GUISetState(@SW_SHOW) GUICtrlSetBkColor($Button1, 0x00ff00) $Button2 = GUICtrlCreateButton("Button1", 16, -140, 123, 25, 0);out of view While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0, "", "button1 triggered") Case $Button2 MsgBox(0, "", "button2 triggered") EndSwitch WEnd Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
amokoura Posted June 14, 2008 Author Share Posted June 14, 2008 Only if you have the one button.With the latest version (3.2.12.1) that trick doesn't help.My GUI app was running nicely with 3.2.10.0 and colored buttons.After I updated to the latest the enter catching bug appeared. Link to comment Share on other sites More sharing options...
amokoura Posted June 14, 2008 Author Share Posted June 14, 2008 Looks like this behaviour might be a by-product of trying to fix an old (unfixable?) bug...http://www.autoitscript.com/forum/index.php?showtopic=46170The example I posted there now seems to work the way it should , but obviously now has the problem you pointed out Funny. The bugfix was too effective that time Coloured buttons swallow every keyboard input in future versions! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now