help with entry widgets 
Author Message
 help with entry widgets

Does anyone know how I can limit the size of an entry widget?  For
example, I only want the user to type in a string of at most 50
characters.  How would I disallow them from typing further characters?

-Dan




Mon, 10 Nov 1997 03:00:00 GMT  
 help with entry widgets


Quote:
>Does anyone know how I can limit the size of an entry widget?  For
>example, I only want the user to type in a string of at most 50
>characters.  How would I disallow them from typing further characters?

For tk4 (and probably tk3 as well):
- Make the entry widget with the -textvariable option
- trace the variable you use on writes
- on each write, make sure that strlen is <= 50

This is the same way to do things like forcing int on an entry widget.
--
     Jeffrey Hobbs                             Office: 503/346-3998

                  URL: http://www.cs.uoregon.edu/~jhobbs/



Thu, 13 Nov 1997 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help on entry widget input encoding

2. Help on entry widget in TK

3. Help with entry widget and name completion.

4. Need help initializing entry widgets within namespaces

5. using entry widget inside tixGrid widget (or list widget)

6. VTCL Entry Widget help!

7. Help on input encoding in entry widget

8. newbie: trying to create password entry widget - help!

9. scan from an entry widget help :(

10. Need Help With tk Entry Widgets

11. Help: scroll in entry widgets

12. Entry widget help

 

 
Powered by phpBB® Forum Software