Jump to content

which one, edit or input?


Recommended Posts

Hi all.

I tried to use Input in my script, but input doesn't support SetSel function like edit does - _GUICtrlEdit_SetSel()

then I tried to use Edit, but if I use style like to make Edit text centered, then I have limited amount of characters

Both of the controls are giving me problems, and both of them doesn't support CTRL+A (select all) hotkey, why is that?, can anyone help?

Edit + centered text + no horizontal boundaries,

or

Input + Select All default text function

...is what I need (with CTRL+A hotkey if it's possible).

p.s. I tried with controlfocus, but it doesn't select input's text, it just give me input control over it without selecting any text.

Link to comment
Share on other sites

#include <GUIConstants.au3>
#include <GuiEdit.au3>

$Form1 = GUICreate("Form1", 246, 74, 193, 125)
$Edit1 = _GUICtrlEdit_Create($Form1, "", 8, 16, 100, 17, $ES_CENTER)
_GUICtrlEdit_SetLimitText($Edit1, 999)
GUICtrlSetData(-1, "Some Text Goes here")
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

8)

NEWHeader1.png

Link to comment
Share on other sites

#include <GUIConstants.au3>
#include <GuiEdit.au3>

$Form1 = GUICreate("Form1", 246, 74, 193, 125)
$Edit1 = _GUICtrlEdit_Create($Form1, "", 8, 16, 100, 17, $ES_CENTER)
_GUICtrlEdit_SetLimitText($Edit1, 999)
GUICtrlSetData(-1, "Some Text Goes here")
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

8)

It does seem that built-in functions and GUI UDF functions don't mix well.
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...