Hi,
I use a stringgadget as an input for numbers, it displays only two digits, but if I use getgadgettext I can obtain a much longer string ... is there a way to retrieve only what is shown on the screen ?
The documentation mentions :
AdvancedGadgetEvents(#switch)
This command must be called before the gadget is created and the state can be changed between creating gadgets. For a list of supported events, look at the help page for the corresponding gadget. 
I looked at the other gadgets and saw no mention of these Advanced Events ... Any help ?
TIA.
Bests.
Stan.
			
			
									
									
						String Gadget ++
Hi Stan,
i'm not sure i understand what you mean... you have a StringGadget that is 2 digits wide and with the 'GetGadgetText' command you get more than 2 ! You probably entered more than 2 characters ... Your StringGadget displays only the 2 last one but contain the whole text !
You can force your StringGadget to be only 2 characters wide by using this :
;for example
StringGadget(99, 100, 100, 100 , 24, "")
SendMessage_(GadgetID(99), #TCM_SETITEMSIZE , 0, 10)
;The StringGadget will accept only 10 Characters
hope i could help
			
			
									
									
						i'm not sure i understand what you mean... you have a StringGadget that is 2 digits wide and with the 'GetGadgetText' command you get more than 2 ! You probably entered more than 2 characters ... Your StringGadget displays only the 2 last one but contain the whole text !
You can force your StringGadget to be only 2 characters wide by using this :
;for example
StringGadget(99, 100, 100, 100 , 24, "")
SendMessage_(GadgetID(99), #TCM_SETITEMSIZE , 0, 10)
;The StringGadget will accept only 10 Characters
hope i could help
Hi TeddyLM,
Bests.
Stan.
			
			
									
									
						This is exactly what I meant, even if my stringgadget is 2 characters wide I can type in more characters, I tried your solution unfortunately it doesn't work for me (using WIN98 SE), unless I missed something ...i'm not sure i understand what you mean... you have a StringGadget that is 2 digits wide and with the 'GetGadgetText' command you get more than 2 ! You probably entered more than 2 characters ... Your StringGadget displays only the 2 last one but contain the whole text !
You can force your StringGadget to be only 2 characters wide by using this :
;for example
StringGadget(99, 100, 100, 100 , 24, "")
SendMessage_(GadgetID(99), #TCM_SETITEMSIZE , 0, 10)
;The StringGadget will accept only 10 Characters
Bests.
Stan.


