Jump to content

Basic question RE: Edit control


Recommended Posts

It seems, by default, AutoIT will highlight text in an edit control when you click into it.

when i click into my edit controls, 99% of the time its to add stuff to the text already in there. if it highlights i sometime overwrite the text by accident (requiring me to right click and select undo)

Is there any way to stop this happening?

see below code.

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)
$Form2 = GUICreate("Form2", 546, 180, 193, 125)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form2Close")
$Edit1 = GUICtrlCreateEdit("", 16, 32, 217, 89)
GUICtrlSetData(-1, "Edit1 - Some text entered here")
$Edit2 = GUICtrlCreateEdit("", 272, 32, 241, 89)
GUICtrlSetData(-1, "Edit2 - some more text here")
GUISetState(@SW_SHOW)


While 1
    Sleep(100)
WEnd


Func Form2Close()
Exit
EndFunc
Link to comment
Share on other sites

It seems, by default, AutoIT will highlight text in an edit control when you click into it.

when i click into my edit controls, 99% of the time its to add stuff to the text already in there. if it highlights i sometime overwrite the text by accident (requiring me to right click and select undo)

Is there any way to stop this happening?

see below code.

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)
$Form2 = GUICreate("Form2", 546, 180, 193, 125)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form2Close")
$Edit1 = GUICtrlCreateEdit("", 16, 32, 217, 89)
GUICtrlSetData(-1, "Edit1 - Some text entered here")
$Edit2 = GUICtrlCreateEdit("", 272, 32, 241, 89)
GUICtrlSetData(-1, "Edit2 - some more text here")
GUISetState(@SW_SHOW)


While 1
    Sleep(100)
WEnd


Func Form2Close()
Exit
EndFunc
Sounds like a problem that was fixed in the latest releases of Beta. What version are you using?
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

I cant try the latest beta.

Im on a work PC and im unable to install it

I currently used the Zip file unpacked onto my USB Memory Stick

I could not find the Beta to download as a Zip file, only EXE. if its available, can somebody point me towards the Zip file?

Alternately, does anybody know if i can install it on another PC, and simply drag and drop the autoit folder back onto my memory stick?

Edited by Starbug
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...