[Gtk-sharp-list] Can label widgets not expand/fill ?
Ben Davis
ben@xsusio.com
Sat, 12 Mar 2005 11:56:00 -0600
This is a multi-part message in MIME format.
--------------020007090302010602020506
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
I have a 4x2 table, the left colum has labels and the right column has
entries. I attached each label using AttachOptions.Expand |
AttachOptions.Fill. I've set each label's justification to
Justification.Left, however the labels do not touch the left edge as I
would expec them to? Can label widgets not expand or fill in a table cell?
(see attached Main.cs)
--------------020007090302010602020506
Content-Type: text/x-csharp;
name="Main.cs"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Main.cs"
// project created on 03/12/2005 at 10:26
using System;
using Gtk;
class MainClass
{
public static void Main (string[] args)
{
Application.Init ();
Window win = new Window ("Test");
Table tbl = new Table(2,2, true);
tbl.RowSpacing = 4;
tbl.ColumnSpacing = 4;
Label lbl1 = new Label("a somewhat long label");
lbl1.Justify = Justification.Left;
Label lbl2 = new Label("short label\ntest");
lbl2.Justify = Justification.Left;
Entry ent1 = new Entry();
Entry ent2 = new Entry();
AttachOptions opts = AttachOptions.Expand | AttachOptions.Fill;
tbl.Attach(lbl1, 0, 1, 0, 1, opts, 0, 0, 0);
tbl.Attach(ent1, 1, 2, 0, 1);
// Why does this label not touch the left edge??
tbl.Attach(lbl2, 0, 1, 1, 2, opts, 0, 0, 0);
tbl.Attach(ent2, 1, 2, 1, 2);
win.Add(tbl);
win.ShowAll();
Application.Run ();
}
}
--------------020007090302010602020506--