mail-archives/gtk-sharp-list/2012-April/010995.html

94 строки
4.1 KiB
HTML
Исходник Постоянная ссылка Обычный вид История

2019-06-06 22:02:55 +03:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] how to obtain height of treeview/treeviewcolumn?
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=Re%3A%20%5BGtk-sharp-list%5D%20how%20to%20obtain%20height%20of%20treeview/treeviewcolumn%3F&In-Reply-To=%3C1333800513.8541.YahooMailNeo%40web120506.mail.ne1.yahoo.com%3E">
<META NAME="robots" CONTENT="index,nofollow">
<style type="text/css">
pre {
white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
}
</style>
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="010994.html">
<LINK REL="Next" HREF="010997.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] how to obtain height of treeview/treeviewcolumn?</H1>
<B>Matej Mihalech</B>
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=Re%3A%20%5BGtk-sharp-list%5D%20how%20to%20obtain%20height%20of%20treeview/treeviewcolumn%3F&In-Reply-To=%3C1333800513.8541.YahooMailNeo%40web120506.mail.ne1.yahoo.com%3E"
TITLE="[Gtk-sharp-list] how to obtain height of treeview/treeviewcolumn?">matejmihalech at yahoo.com
</A><BR>
<I>Sat Apr 7 12:08:33 UTC 2012</I>
<P><UL>
<LI>Previous message: <A HREF="010994.html">[Gtk-sharp-list] Gtk.ListStore
</A></li>
<LI>Next message: <A HREF="010997.html">[Gtk-sharp-list] Updated .msi for .NET?
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#10995">[ date ]</a>
<a href="thread.html#10995">[ thread ]</a>
<a href="subject.html#10995">[ subject ]</a>
<a href="author.html#10995">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Hi everyone!
How can I obtain height of treeview/treeviewcolumn, please? I have simple code with layout (inside is big treeview) and vertical scrollbar in the table. When I set small height of layout, I do not see all items of treeview and when I set it big, I see whole table with empty space at the bottom of layout. Is it possible to set layout, that it will have exactly same height like treeview or the biggest from treeviewcolumns ?
Thanks in advance.
A piece of code:
tree = new Gtk.TreeView();
vadjustment = new Gtk.Adjustment(0, 0, 0, 0, 0, 0);
vscrollbar = new Gtk.VScrollbar(vadjustment);
Lyout layout = new Layout(null, vadjustment);
layout.Put(tree, 0, 0);
Table table =&#160; new Table(1, 2, false);
table.Attach(layout, 0, 1, 0, 1, Gtk.AttachOptions.Expand|Gtk.AttachOptions.Fill, Gtk.AttachOptions.Expand|Gtk.AttachOptions.Fill, 0, 0);
table.Attach(vscrollbar, 1, 2, 0, 1, Gtk.AttachOptions.Shrink, Gtk.AttachOptions.Shrink|Gtk.AttachOptions.Fill, 0, 0);
box.PackStart (table, true, true, 4);
vbox1.Add(box);
...
TreeViewColumn first = new TreeViewColumn();
first.Title=h1;
Gtk.CellRendererText first_name_cell = new Gtk.CellRendererText ();
first.PackStart(prvy_name_cell, true);
first_name_cell.Width=20;
...
tree.AppendColumn (first);
layout.SetSize(800, ???);
&#160;
Matej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: &lt;<A HREF="http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20120407/b78d4ee1/attachment.html">http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20120407/b78d4ee1/attachment.html</A>&gt;
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="010994.html">[Gtk-sharp-list] Gtk.ListStore
</A></li>
<LI>Next message: <A HREF="010997.html">[Gtk-sharp-list] Updated .msi for .NET?
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#10995">[ date ]</a>
<a href="thread.html#10995">[ thread ]</a>
<a href="subject.html#10995">[ subject ]</a>
<a href="author.html#10995">[ 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>