Jump to content

Recommended Posts

Posted

By using GUICtrlSetBkColor() on a button causes it to catch enter key.

More info: http://svn.autoitscript.com/trac/ticket/376

Only 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.
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...