зеркало из https://github.com/mono/mail-archives.git
121 строка
4.6 KiB
HTML
121 строка
4.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] FileOpenDialog?? - Get current Row?
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20FileOpenDialog%3F%3F%20-%20Get%20current%20Row%3F&In-Reply-To=">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="007739.html">
|
|
<LINK REL="Next" HREF="007741.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] FileOpenDialog?? - Get current Row?</H1>
|
|
<B>Duong Nguyen</B>
|
|
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20FileOpenDialog%3F%3F%20-%20Get%20current%20Row%3F&In-Reply-To="
|
|
TITLE="[Gtk-sharp-list] FileOpenDialog?? - Get current Row?">duongnguyen at mail.ru
|
|
</A><BR>
|
|
<I>Sat Jan 27 15:38:59 EST 2007</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="007739.html">[Gtk-sharp-list] FileOpenDialog??
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007741.html">[Gtk-sharp-list] FileOpenDialog?? - Get current Row?
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7740">[ date ]</a>
|
|
<a href="thread.html#7740">[ thread ]</a>
|
|
<a href="subject.html#7740">[ subject ]</a>
|
|
<a href="author.html#7740">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>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: <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">gtk-sharp-list at lists.ximian.com</A>
|
|
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 <A HREF="http://docs.gotmono.net/.">http://docs.gotmono.net/.</A>
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
|
_______________________________________________
|
|
Gtk-sharp-list maillist - <A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">Gtk-sharp-list at lists.ximian.com</A>
|
|
<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</A>
|
|
-------------- next part --------------
|
|
An HTML attachment was scrubbed...
|
|
URL: <A HREF="http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070127/a37d710c/attachment.html">http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070127/a37d710c/attachment.html</A>
|
|
</PRE>
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="007739.html">[Gtk-sharp-list] FileOpenDialog??
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007741.html">[Gtk-sharp-list] FileOpenDialog?? - Get current Row?
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7740">[ date ]</a>
|
|
<a href="thread.html#7740">[ thread ]</a>
|
|
<a href="subject.html#7740">[ subject ]</a>
|
|
<a href="author.html#7740">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
|
|
mailing list</a><br>
|
|
</body></html>
|