您可以通过在构造函数中定义其Action-Property来限制操作
private void OpenOFD()
{
Gtk.FileChooserDialog filechooser =
new Gtk.FileChooserDialog("Choose the file to open",
this,
FileChooserAction.Open,
"Cancel",ResponseType.Cancel,
"Open",ResponseType.Accept);
if (filechooser.Run() == (int)ResponseType.Accept)
{
System.IO.FileStream file = System.IO.File.OpenRead(filechooser.Filename);
file.Close();
}
filechooser.Destroy();
}
Run Code Online (Sandbox Code Playgroud)
有4个FolderChooserActions:
归档时间: |
|
查看次数: |
6115 次 |
最近记录: |