简体   繁体   English

我如何知道是否在C的GTK中选择了一个条目或将其聚焦?

[英]How can I know if an entry is selected or focused in GTK for C?

I have two entries and I need to know which one is selected. 我有两个条目,我需要知道选择了哪个。 Depending on that function, a button will set text to the entry selected. 根据该功能,一个按钮会将文本设置为所选的条目。

You're probably looking for gtk_widget_is_focus . 您可能正在寻找gtk_widget_is_focus That returns true if typing on the keyboard would send text to that widget. 如果在键盘上键入会将文本发送到该小部件,则返回true。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM