[Glade-users] Could anybody help? changing text being typed into entry field

Hello Everybody.
I am resending this question once again. Would really like to get an answer (see bellow).
Thanks much.


I have an entry field created in Glade. In my Python code when I type into that field, I want allow only 
alphanumeric characters and make them all capital while typing.
What I have so far is this:
def init(wtree) :
  myField = wtree.get_widget('entryField') 
  myField.connect('insert_text', on_entryField_insert_text)
on_entryField_insert_text(entry, text, text_length, user_data=None) :
  for char in text[:text_length] :
    if (char.isalnum() == False) :
The above will only allow typing alpha-numeric characters. How do I modify the code so it would make the 
input all capital letters while typing?
Thanks much.

_______________________________________________ Glade-users maillist - Glade-users at lists.ximian.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20100930/3e644797/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001
Url: http://lists.ximian.com/pipermail/glade-users/attachments/20100930/3e644797/attachment.pl 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]