I'm a newbie to Pure Basic.
Can anybody help me how to control the max length of a string gadget?
What I mean: If I want to have an input for example max. 4 characters,
is there any solution to allow only 4 charecters to be keyed in.
It is not the way, that I check the length after the user made an
input of 23 characters, then I warn him: only 4 characters are allowed.
I want to make a possibility to input only 4 characters on the
windows screen.
Thanks,
soswing
How to control string gadget length
I think that for now you have to use the API to do this, on WinOS platforms you use this:
Code: Select all
SendMessage_(GadgetID(#YOUR_STRING_GADGET), #EM_LIMITTEXT, 4, 0)
; where 4 is the char limit you set
How to control string gadget length
Thanks Pupil,
It works fine!!
soswing
It works fine!!
soswing

