svn path=/trunk/gtk-sharp/; revision=35666
This commit is contained in:
Miguel de Icaza 2004-11-04 20:03:15 +00:00
parent 532947448e
commit 31b0cf439c
2 changed files with 29 additions and 1 deletions

View file

@ -1211,7 +1211,20 @@
<summary>Makes a new Pixbuf object from a <see cref="T:System.IO.Stream" />.</summary> <summary>Makes a new Pixbuf object from a <see cref="T:System.IO.Stream" />.</summary>
<param name="stream">a <see cref="T:System.IO.Stream" /></param> <param name="stream">a <see cref="T:System.IO.Stream" /></param>
<returns>a <see cref="T:Gdk.Pixbuf" /></returns> <returns>a <see cref="T:Gdk.Pixbuf" /></returns>
<remarks /> <remarks>Useful for creating a Pixbuf from an image file that resides in memory.
<example>
<code lang="C#">
/* buffer containing an image */
System.Byte[] buffer = new System.Byte[256];
/* create a memory stream to the buffer */
System.IO.MemoryStream memorystream = new System.IO.MemoryStream(buffer);
/* create a pixbuf from the stream as if it was a file */
Gdk.Pixbuf pb = new Gdk.Pixbuf(memorystream);
</code>
</example></remarks>
</Docs> </Docs>
</Member> </Member>
<Member MemberName=".ctor"> <Member MemberName=".ctor">

View file

@ -1149,6 +1149,21 @@ The following code sample will append a new <see cref="T:Gtk.CellRendererText" /
<code lang="C#"> <code lang="C#">
CellRendererText text = new CellRendererText (); CellRendererText text = new CellRendererText ();
tree_view.AppendColumn ("title", text, "text", 0); tree_view.AppendColumn ("title", text, "text", 0);
</code>
</example>
<para>This example illustrates how you can control the "editable" attribute of a column on a row-by-row basis.</para>
<example>
<code lang="C#">
TreeStore store = new TreeStore (typeof (string), typeof(bool));
/* add a column that will display the 'string' from the store */
/* note that we are binding the "text" value to column 0 of the store, and the "editable" value to the column 1 value of the store */
/* this enables per-row control over the editable flag, if desired */
tv.AppendColumn("My string", new CellRendererText(), "text", 0, "editable", 1);
/* add a couple of rows to the treeview */
store.AppendValues("You can edit this", true);
store.AppendValues("You can't edit this", false);
</code> </code>
</example> </example>
</remarks> </remarks>