[Glade-users] changing text being typed into entry field
- From: ashats at hotmail.com (Arthur Shats)
- Subject: [Glade-users] changing text being typed into entry field
- Date: Wed, 29 Sep 2010 21:43:45 +0000
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20100929/090fcdae/attachment.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]