How to remove selection from first Entry on Dialog release?

When Dialog released, the first Entry in order has text selected:

How can I release widget without that?
Tried to set receives_default = false but it has no effect.

UPD. for some reason I can delete selection with timeout but not immediately after Dialog release

mime.connect_realize(|this| {
    gtk::glib::timeout_add_seconds_local_once(1, {
        let this = this.clone();
        move || {
            this.select_region(0, 0);
        }
    });
});

Hi,

You may want to try Gtk.Entry.grab_focus_without_selecting

1 Like

Thanks, I’ve tried, but I it really grabs the focus.

On this example, the Entry should be without focus, and without selection.
I’m using my example with 100 ms delay, no ideas how to resolve but maybe add any other empty widget and focus on it (on realize)

Why? And which element should be selected instead?

1 Like

which element should be selected instead

by current GTK implementation the answer in that

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.