зеркало из https://github.com/mono/mail-archives.git
68 строки
5.7 KiB
HTML
68 строки
5.7 KiB
HTML
<tt>
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br>
|
|
<html><br>
|
|
<head><br>
|
|
<meta content="text/html; charset=ISO-8859-1"<br>
|
|
http-equiv="Content-Type"><br>
|
|
</head><br>
|
|
<body bgcolor="#ffffff" text="#000000"><br>
|
|
I think this is what your are after:<br><br>
|
|
<br><br>
|
|
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Gtk.ListStore lsTest = new ListStore(typeof(int),<br>
|
|
typeof(string), typeof(string);<br><br>
|
|
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Gtk.ComboBox cboText = new Gtk.ComboBox();<br><br>
|
|
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Gtk.CellRendererText ct = new Gtk.CellRendererText();<br><br>
|
|
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Gtk.CellRendererText ct2 = new Gtk.CellRendererText();<br><br>
|
|
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cboText.PackStart(ct, false);<br><br>
|
|
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cboText.PackStart(ct2,false);<br><br>
|
|
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cboText.AddAttribute(ct, "text", 0);<br><br>
|
|
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cboText.AddAttribute(ct2, "text", 1);<br><br>
|
|
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cboText.Model = lsTest;<br><br>
|
|
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; lsTest.AppendValues(1, "Row One", "Extra");<br><br>
|
|
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; lsTest.AppendValues(2, "Row Two", "Extra 2"); <br><br>
|
|
<br><br>
|
|
This would display the 1nd and 2rd columns of the list store while<br>
|
|
making the 3rd column easily accessable by getting the GetActiveIter.<br>
|
|
If you're adding text via Stetic I don't know of anyway to gain access<br>
|
|
to additional data, I think you have to use a ListStore.<br><br>
|
|
<br><br>
|
|
I hope I understood the question right, if not I'll try again.<br><br>
|
|
<br><br>
|
|
SpoodyGoon<br><br>
|
|
<div class="moz-signature"><br>
|
|
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><br>
|
|
<title>Andy York (aka Spoody Goon)</title><br>
|
|
<br><br>
|
|
</div><br>
|
|
<br><br>
|
|
On 2/19/2010 6:37 AM, Elmar Haneke wrote:<br>
|
|
<blockquote cite="mid:4B7E780F.6000308@haneke.de" type="cite"><br>
|
|
<pre wrap="">Hi, I do have some problem in display of an GtkComboBox showing several<br>
|
|
columns (the first with data to select, additional with more information<br>
|
|
about each item).<br>
|
|
<br>
|
|
The Problem is that data is not aligned to columns - each cell does have<br>
|
|
a different width.<br>
|
|
<br>
|
|
How can I change that?<br>
|
|
<br>
|
|
Elmar<br>
|
|
<br>
|
|
<br>
|
|
_______________________________________________<br>
|
|
Gtk-sharp-list maillist - <a class="moz-txt-link-abbreviated" href="mailto:Gtk-sharp-list@lists.ximian.com">Gtk-sharp-list@lists.ximian.com</a><br>
|
|
<a class="moz-txt-link-freetext" href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">http://lists.ximian.com/mailman/listinfo/gtk-sharp-list</a></pre><br>
|
|
<pre wrap=""><br>
|
|
<fieldset class="mimeAttachmentHeader"></fieldset><br>
|
|
<br>
|
|
No virus found in this incoming message.<br>
|
|
Checked by AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a> <br>
|
|
Version: 8.5.435 / Virus Database: 271.1.1/2697 - Release Date: 02/19/10 07:34:00<br>
|
|
<br>
|
|
</pre><br>
|
|
</blockquote><br>
|
|
</body><br>
|
|
</html><br>
|
|
|
|
</tt>
|