onemorequestion
onemorequestion

Reputation: 1266

Make GTK Entry only focusable on click but gain keyboard control if selected

I have a GtkBox with some GtkEntry elements inside.

Some of them should not be focused by keyboard-tab. Only when clicking on them. How can this be achieved?

If I set gtk_widget_set_can_focus to FALSE for an Entry I solved the focus problem. But cannot interact with the keyboard anymore.

What is a proper solution for not accepting focus by keyboard but on click within Gtk 3.18.9?

Upvotes: 0

Views: 266

Answers (1)

lb90
lb90

Reputation: 958

You can use gtk_container_set_focus_chain() for that.

Upvotes: 1

Related Questions