Sign in to follow this  
Followers 0
sandin

which one, edit or input?

9 posts in this topic

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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

It does seem that built-in functions and GUI UDF functions don't mix well.

yea, I had to learn that one by trial and error too!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

tnx for the help :) though it's still limited to edit's width... :P

Set the style to $ES_AUTOHSCROLL.

Share this post


Link to post
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
Sign in to follow this  
Followers 0