I am using a Gtk.Entry and writing from left to right (xalign==0.0).
When the entry is not empty, the cursor is to the right of the text (as expected):
But when the entry is empty, the cursor is on the right:
That is how I create the entry:
def CreateUserEntry(self):
self.user_entry = Gtk.Entry()
self.user_entry.set_width_chars(10)
user_label = Gtk.Label(label="User:")
self.user_entry.set_text(self.args.user)
self.user_entry.connect('activate', self.ActivateUserTextbox)
user_box = Gtk.HBox()
user_box.pack_start(user_label, expand=False, fill=False, padding=10)
user_box.pack_start(self.user_entry, expand=False, fill=False, padding=0)
return user_box
def ActivateUserTextbox(self, widget):
new_user = widget.get_text().strip()
self.args.user = new_user
How do I fix this? thanks