gpt4 book ai didi

c - 键盘助记符不起作用

转载 作者:行者123 更新时间:2023-11-30 17:14:57 24 4
gpt4 key购买 nike

在下面的代码中,我希望 Ctrl + F 隐藏/显示 GtkExpander 的子项但这并没有发生。

#include <gtk/gtk.h>
int main (int argc,char *argv[])
{

GtkWidget *window, *expander, *label;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Expander");
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
gtk_widget_set_size_request (window, 200, 100);

expander = gtk_expander_new_with_mnemonic ("Click Me _For More!");
label = gtk_label_new ("Hide me or show me,\nthat is your choice.");
gtk_container_add (GTK_CONTAINER (expander), label);

gtk_expander_set_expanded (GTK_EXPANDER (expander), TRUE);

gtk_container_add (GTK_CONTAINER (window), expander);

gtk_widget_show_all (window);
gtk_main ();
return 0;
}

感谢任何帮助。

最佳答案

根据 unwind 的建议,我仔细检查了默认修饰符它是 Alt + F 而不是 Ctrl + F。问题解决了。

关于c - 键盘助记符不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30120028/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com