How to programmatically close a GtkDropDown list's popup in GTK4 - Stack Overflow

I'm working with GTK4 and using a GtkDropDown widget to show a list of items. I regularly needed t

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

Without 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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745671570a4639434.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信