Jump to content
Sign in to follow this  
fesrts

Enter text in GUICtrlCreateInput / Scroll left as typing

Recommended Posts

fesrts

Hello,

I have an input field that displays only up to 10 characters. But the user is expected to type more than 10 and as they type, I would hope that the text in the input field will move to the left. As my GUI size is limited and constraint, I cannot have the input box any longer (nor can I have it any larger).

For example,

Max viewable in the input box

123456790

User continues to type another "abcd"

Input box should show

567890abcd

I tried $ES_AUTOHSCROLL but it seems to be the wrong option to use.

Appreciate any thoughts and suggestion.

Share this post


Link to post
Share on other sites
kylomas

fesrts,

$ES_AUTOHSCROLL works for me...

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>

#AutoIt3Wrapper_Add_Constants=n

local $gui010   =   guicreate('')
local $inp010   =   guictrlcreateinput('',0,20,50,20,$es_autohscroll)
                    guisetstate()

while 1
    switch guigetmsg()
        case $gui_event_close
            Exit
    EndSwitch
WEnd

Perhaps you are having some other problem.  Post your code for more help.

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites
fesrts

Hey thanks!... through your example given, I found where the error is.

I had it as

$idScanUserID = GUICtrlCreateInput("", 272, 160, 145, 36, 0,  $es_autohscroll)

When it should be

$idScanUserID = GUICtrlCreateInput("", 272, 160, 145, 36, $es_autohscroll)

Many thanks.... Cheers.

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  

×