[Glade-users] Could anybody help? changing text being typed into entry field
Arthur Shats
ashats at hotmail.com
Thu Sep 30 13:02:22 EDT 2010
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) :
entry.emit_stip_by_name('insert_text')
pass
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.
Arthur.
_______________________________________________ Glade-users maillist - Glade-users at lists.ximian.com http://lists.ximian.com/mailman/listinfo/glade-users
-------------- 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
More information about the Glade-users
mailing list