A utility I'm writing includes a gtk.Entry whose default value is the clipboard contents. Since the clipboard contents won't always fit in the Entry without scrolling, and since the most important information is at the beginning of the string, I want the first character to be visible (plus whatever other characters fit).
My approach to this has been to try to set the cursor to position 0 (the Entry has input focus by default). However, this test code produces weird results:
The printed results are: Furthermore, the word "test" appears after the pasted text, but the cursor is immediately before the word "test". So not only is the cursor not getting moved, but get_position() is reporting incorrect values. What's wrong?
# self.text_entry is an instance of gtk.Entry
EDIT: I've attached a screenshot showing the state after the code snippets above have run.