Re: widget text [message #37764] |
Tue, 20 January 2004 08:55 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Nuno Oliveira writes:
>
> I'm working with text widget with keyword editable and I would like that the
> user would not be able to insert more than three characters. Keyword xsize
> only controls the size, not the length of the contents.
>
> The only that occurs to me is seeking for all widget text events, and if the
> string has per example four characters then it extracts a sub string with
> the first three characters.
>
> The question if there's a parameter or any other way to do this easier.
There is no parameter. You will have to do it yourself.
See, for example, how I limit the text input to
just integers or to a certain number of digits to the
right of a decimal point in floats in FSC_INPUTFIELD:
http://www.dfanning.com/programs/fsc_inputfield.pro
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|