Jump to content
Sign in to follow this  
Yokes9

Limiting text in a GUICtrlCreateInput

Recommended Posts

Yokes9

I have a GUICtrlCreateInput and I want to limit the amount of charactors that can be put into the box to 3. Right now I can continue typing as long as I'd like. I'd like it to only allow the 3 charactors that can be seen if you type in it. So its not forcing the other charactors out of the screen.

Hopefully this makes sense.

Don't have any code to show you but this might help explain what i'm saying.

GUICreate("Example", 400, 220)

    GUICtrlCreateInput ( "", 70,  50, 25, 20)
    GUICtrlCreateInput ( "", 105,  50, 25, 20)
    GUICtrlCreateInput ( "", 140,  50, 25, 20)
    GUICtrlCreateInput ( "", 175,  50, 25, 20)

GUISetState () 

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

The 4 small boxes, I don't want to beable to force charactors out of them.

Thanks for any help!


I suck at programming... But I try really hard! :imwithstupid:

Share this post


Link to post
Share on other sites
Malkey

I have a GUICtrlCreateInput and I want to limit the amount of charactors that can be put into the box to 3. Right now I can continue typing as long as I'd like. I'd like it to only allow the 3 charactors that can be seen if you type in it. So its not forcing the other charactors out of the screen.

Hopefully this makes sense.

Don't have any code to show you but this might help explain what i'm saying.

GUICreate("Example", 400, 220)

    GUICtrlCreateInput ( "", 70,  50, 25, 20)
    GUICtrlCreateInput ( "", 105,  50, 25, 20)
    GUICtrlCreateInput ( "", 140,  50, 25, 20)
    GUICtrlCreateInput ( "", 175,  50, 25, 20)

GUISetState () 

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

Share this post


Link to post
Share on other sites
Yokes9

Thanks Malkey! That is exactly what I was looking for! ;)


I suck at programming... But I try really hard! :imwithstupid:

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.