зеркало из https://github.com/mono/mail-archives.git
110 строки
4.1 KiB
HTML
110 строки
4.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] treeview header size
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:andrei.ivanov%40ines.ro">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="003912.html">
|
|
<LINK REL="Next" HREF="003905.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] treeview header size
|
|
</H1>
|
|
<B>Andrei Ivanov
|
|
</B>
|
|
<A HREF="mailto:andrei.ivanov%40ines.ro"
|
|
TITLE="[Gtk-sharp-list] treeview header size">andrei.ivanov@ines.ro
|
|
</A><BR>
|
|
<I>Sat, 24 Apr 2004 23:16:23 +0300 (EEST)</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="003912.html">[Gtk-sharp-list] treeview header size
|
|
</A></li>
|
|
<LI> Next message: <A HREF="003905.html">[Gtk-sharp-list] Gtk# 0.18 on WinXP : Desktop freezes if window is moved
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#3921">[ date ]</a>
|
|
<a href="thread.html#3921">[ thread ]</a>
|
|
<a href="subject.html#3921">[ subject ]</a>
|
|
<a href="author.html#3921">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>
|
|
On Fri, 23 Apr 2004, John Luke wrote:
|
|
|
|
><i> On Thu, 2004-04-22 at 14:17 +0300, Andrei Ivanov wrote:
|
|
</I>><i> > Hello,
|
|
</I>><i> > I've created a treeview and I'm trying to alter the size of its header.
|
|
</I>><i> >
|
|
</I>><i> > The only way that I found about how to get a reference to the buttons
|
|
</I>><i> > that create the header is like this:
|
|
</I>><i> >
|
|
</I>><i> > CellRendererText renderer = new CellRendererText();
|
|
</I>><i> > TreeViewColumn column = new TreeViewColumn("Name", renderer, "text", 0);
|
|
</I>><i> >
|
|
</I>><i> > column.Widget = new Gtk.Label("aa");
|
|
</I>><i> > column.Widget.Show();
|
|
</I>><i> > treeview1.AppendColumn(column);
|
|
</I>><i> >
|
|
</I>><i> > //column.Widget -> Label
|
|
</I>><i> > //column.Widget.Parent -> Alignment
|
|
</I>><i> > //column.Widget.Parent.Parent -> HBox
|
|
</I>><i> >
|
|
</I>><i> > Gtk.Button header = (Gtk.Button)column.Widget.Parent.Parent.Parent;
|
|
</I>><i> >
|
|
</I>><i> > My problem is that I don't know how to alter the size of that button.
|
|
</I>><i> >
|
|
</I>><i> > In glade, the common properties tab of a normal button include width and
|
|
</I>><i> > height, but the header button doesn't seem to have them.
|
|
</I>><i> >
|
|
</I>><i>
|
|
</I>><i> TreeViewColumn has FixedWidth, MaxWidth, and MinWidth properties, is
|
|
</I>><i> that what you want? Or if you add the CellRenderer with PackStart to the
|
|
</I>><i> column you can specify if you want it to expand or not.
|
|
</I>><i>
|
|
</I>><i> This might be useful if it helps to have examples in C of the TreeView:
|
|
</I>><i> <A HREF="http://scentric.net/tutorial/">http://scentric.net/tutorial/</A>
|
|
</I>><i>
|
|
</I>
|
|
Unfortunately, that doesn't help me. I'm not trying to modify the column,
|
|
but the header of the column, and more exactly, the distance between the
|
|
label and the edge of the button. I've managed to modify the size of the
|
|
button, but not the padding :(
|
|
|
|
This is what I've been doing:
|
|
//nothing changes
|
|
(column.Widget as Label).Ypad = 0;
|
|
|
|
Gtk.Box box = (Gtk.Box)column.Widget.Parent.Parent;
|
|
|
|
//nothing changes
|
|
box.Spacing = 0;
|
|
|
|
//it works, doesn't do what I want
|
|
box.HeightRequest = 10;
|
|
|
|
//doesn't make any difference
|
|
box.SetChildPacking(column.Widget.Parent, false, false, 0, Gtk.PackType.Start);
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="003912.html">[Gtk-sharp-list] treeview header size
|
|
</A></li>
|
|
<LI> Next message: <A HREF="003905.html">[Gtk-sharp-list] Gtk# 0.18 on WinXP : Desktop freezes if window is moved
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#3921">[ date ]</a>
|
|
<a href="thread.html#3921">[ thread ]</a>
|
|
<a href="subject.html#3921">[ subject ]</a>
|
|
<a href="author.html#3921">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|