Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的代码中,我有这样的行:
Builder builder = new Builder(); builder.AddFromFile(gladefile); FileChooserDialog dialog = (FileChooserDialog) builder.GetObject("dialog"); dialog.DefaultResponse = ResponseType.Ok;
有没有办法在 glade 文件中设置默认响应,而不是手动设置?
是的。当您在 Glade 中创建 GtkFileChooserDialog 时,您将按钮添加到对话框的按钮框中。例如,“确定”和“取消”。要将“确定”按钮设为默认,请选择“确定”按钮,转到“常用”属性,然后打开“可以默认”和“具有默认值”。