[Gtk-sharp-list] FileOpenDialog?? - Get current Row?
    Duong Nguyen 
    duongnguyen at mail.ru
       
    Sat Jan 27 15:38:59 EST 2007
    
    
  
Hi,
Thanks for your help and sorry for not having read carefully.
I have once more question about Gtk.StoreList that bound to TreeView. How to get the selected row of the StoreList?
  ----- Original Message ----- 
  From: Petteri Kautonen 
  To: gtk-sharp-list at lists.ximian.com 
  Sent: Saturday, January 27, 2007 7:09 PM
  Subject: Re: [Gtk-sharp-list] FileOpenDialog??
  Duong Nguyen wrote: 
    Hello!
    How to create and use a FileOpenDialog in Gtk#? Pls help me!
    Thanks in advance
  Here is how:
  // create the dialog
  // remember to choose correct FileChooserAction from these self-explanatory values:
  // Open, Save, SelectFolder, CreateFolder
  FileChooserDialog Fcd = new FileChooserDialog ("Open file", null, FileChooserAction.Open);
  // add buttons you wish to see in the dialog
  Fcd.AddButton(Stock.Cancel, ResponseType.Cancel);
  Fcd.AddButton(Stock.Open, ResponseType.Ok);
  // then create a filter for files. For example .gif:
  // filter is not necessary if you wish to see all files in the dialog
  Fcd.Filter = new FileFilter();
  Fcd.Filter.AddPattern("*.gif");
  // if you wish to select multiple files set the do the following:
  Fcd.SelectMultiple = true;
  // In this case read Filenames-property instead of Filename-property
  // run the dialog
  ResponseType RetVal = (ResponseType)Fcd.Run();
  // handle the dialog's exit value
  // Read the file name from Fcd.Filename
  if (RetVal == ResponseType.Ok) {
  // do something
  } else {
  // do something else
  }
  // destroy the dialog
  Fcd.Destroy();
  PS. There is a documentation covering gtk# at http://docs.gotmono.net/.
------------------------------------------------------------------------------
  _______________________________________________
  Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070127/a37d710c/attachment.html 
    
    
More information about the Gtk-sharp-list
mailing list