[pygtk] Need to control cursor position in selected text of gtk.Entry
Gary Jaffe
gfj555 at gmail.com
Sun Feb 27 01:14:20 WST 2011
Hi,
I have a gtk.Entry in which I place a code followed by a description. The
user enters the code, and I do a keyed lookup and place the code +
description of that code in the gtk.Entry and move focus to the next
gtk.Entry.
If the user made a mistake and wants to enter a different code in the first
gtk.Entry, I select the entire text of the gtk.Entry when I see it grabbing
focus so the user doesn't have to delete all the old text that's in the
gtk.Entry. His first key stroke will do that.
But there's a problem. If the code + description is too long, gtk will move
the cursor position to the end of the text when I select the whole text,
hiding the code that is in error. If I then move the cursor to the
beginning of the text, that will un-select the text.
So, is there a way to select the entire text of a gtk.Entry that's too long
to show all of it, and have gtk show the beginning of the text rather than
the end?
Thanks,
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20110226/d024c391/attachment.html>
More information about the pygtk
mailing list