Sign in to follow this  
Followers 0
Yokes9

Limiting text in a GUICtrlCreateInput

3 posts in this topic

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

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

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  
Followers 0