mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-08 07:53:17 +02:00
parent
532947448e
commit
31b0cf439c
@ -1211,7 +1211,20 @@
|
||||
<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>
|
||||
<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>
|
||||
</Member>
|
||||
<Member MemberName=".ctor">
|
||||
|
@ -1151,6 +1151,21 @@ CellRendererText text = new CellRendererText ();
|
||||
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>
|
||||
</example>
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
|
Loading…
Reference in New Issue
Block a user