svn path=/trunk/gtk-sharp/; revision=35651
This commit is contained in:
Miguel de Icaza 2004-11-04 19:34:16 +00:00
parent cac3c4a368
commit fe6aad5317
2 changed files with 23 additions and 12 deletions

View file

@ -30,6 +30,7 @@ using Gtk;
class FileSelectionSample class FileSelectionSample
{ {
Label lbl; Label lbl;
FileSelection fs;
static void Main () static void Main ()
{ {
@ -49,18 +50,28 @@ class FileSelectionSample
vbox.Add (btn); vbox.Add (btn);
lbl = new Label ("Selected: "); lbl = new Label ("Selected: ");
vbox.Add (lbl); vbox.Add (lbl);
win.ShowAll (); win.ShowAll ()
fs = new FileSelection ("Choose a file");
fs.Response += new ResponseHandler (OnFileSelectionResponse);
Application.Run (); Application.Run ();
} }
void OnButtonClicked (object o, EventArgs args) void OnButtonClicked (object o, EventArgs args)
{ {
FileSelection fs = new FileSelection ("Choose a file");
fs.Run (); fs.Run ();
lbl.Text = "Selected: " + fs.SelectionEntry.Text;
fs.Hide (); fs.Hide ();
} }
void OnFileSelectionResponse (object o, ResponseArgs args)
{
if (args.ResponseId == ResponseType.Ok)
{
lbl.Text = "Selected: " + fs.Filename;
}
}
void OnWinDelete (object o, DeleteEventArgs args) void OnWinDelete (object o, DeleteEventArgs args)
{ {
Application.Quit (); Application.Quit ();

View file

@ -442,7 +442,7 @@
<Docs> <Docs>
<summary> <summary>
Calls <see cref="M:Gtk.TextTagTable.Lookup(System.String)" /> on the buffer's tag table to get a <see cref="T:Gtk.TextTag" />, then calls Calls <see cref="M:Gtk.TextTagTable.Lookup(System.String)" /> on the buffer's tag table to get a <see cref="T:Gtk.TextTag" />, then calls
<see cref="Gtk.TextBuffer.RemoveTag((Gtk.TextTag,Gtk.TextIter,Gtk.TextIter)" /></summary> <see cref="M:Gtk.TextBuffer.RemoveTag(Gtk.TextTag,Gtk.TextIter,Gtk.TextIter)" /></summary>
<param name="name">the name of the tag</param> <param name="name">the name of the tag</param>
<param name="start">the beginning of the buffer to be untagged</param> <param name="start">the beginning of the buffer to be untagged</param>
<param name="end">the end of the buffer to be untagged</param> <param name="end">the end of the buffer to be untagged</param>
@ -764,7 +764,7 @@
<returns>a string containing the text from the specified range</returns> <returns>a string containing the text from the specified range</returns>
<remarks> <remarks>
<para> <para>
Returns the text in the range specified by <paramref name="start" /> and <paramref name="end" />. Excludes Returns the text in the range specified by <see paremref="start" /> and <see paremref="end" />. Excludes
undisplayed text (text marked with tags that set the undisplayed text (text marked with tags that set the
invisibility attribute) if <paramref name="include_hidden_chars" /> is <see langword="false" />. Does not include characters invisibility attribute) if <paramref name="include_hidden_chars" /> is <see langword="false" />. Does not include characters
representing embedded images, so byte and character representing embedded images, so byte and character
@ -772,7 +772,7 @@
and character indexes into the buffer. and character indexes into the buffer.
</para> </para>
<para> <para>
Contrast this with <see cref="Gtk.TextBuffer.GetSlice(Gtk.TextIter,Gtk.TextIter,&#xA; System.Boolean)" />. Contrast this with <see cref="M:Gtk.TextBuffer.GetSlice(Gtk.TextIter,Gtk.TextIter,System.Boolean)" />.
</para> </para>
</remarks> </remarks>
</Docs> </Docs>