admin管理员组文章数量:1435859
I'm working with GTK4 and using a GtkDropDown widget to show a list of items. I regularly needed to update the list. I want to disable the dropdown and close pop up menu (if opened by the user). Thus, I need to programmatically close the dropdown's pop-up list before updating the list.
Is there a function or method in GTK4 that allows me to close the pop-up list of a GtkDropDown programmatically?
Thanks for your help
I'm working with GTK4 and using a GtkDropDown widget to show a list of items. I regularly needed to update the list. I want to disable the dropdown and close pop up menu (if opened by the user). Thus, I need to programmatically close the dropdown's pop-up list before updating the list.
Is there a function or method in GTK4 that allows me to close the pop-up list of a GtkDropDown programmatically?
Thanks for your help
Share Improve this question asked Nov 15, 2024 at 21:07 aliaktasaliaktas 16510 bronze badges1 Answer
Reset to default 0Without Programmscrip, the problem is not really understandable. All the programs I create complete the GtkDropDown when it loses its focus.
That's why I recommend trying the features inherited from GtkWidget to control the focus.
void
gtk_root_set_focus (
GtkRoot* self,
GtkWidget* focus
)
...
void
gtk_window_set_focus (
GtkWindow* window,
GtkWidget* focus
)
and so on.
Have fun testing.
本文标签: How to programmatically close a GtkDropDown list39s popup in GTK4Stack Overflow
版权声明:本文标题:How to programmatically close a GtkDropDown list's popup in GTK4 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745671570a2669599.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论