使GTK Entry仅专注于单击,但如果选择,则获得键盘控制 [英] Make GTK Entry only focusable on click but gain keyboard control if selected

查看:102
本文介绍了使GTK Entry仅专注于单击,但如果选择,则获得键盘控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有一些GtkEntry元素的GtkBox.

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?

如果将条目的gtk_widget_set_can_focus设置为FALSE,则解决了焦点问题. 但是不能再与键盘交互了.

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.

在Gtk 3.18.9中单击键盘不接受焦点而是单击的正确解决方案是什么?

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

推荐答案

您可以使用 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆