Re: goocanvas.Table: expand /align problems
- From: Alessandro Dentella <sandro e-den it>
- To: goocanvas-list gnome org
- Subject: Re: goocanvas.Table: expand /align problems
- Date: Tue, 22 Sep 2009 09:23:06 +0200
Hi,
can someone tell me what's wrong with the code below?
I dont't seem to understand align and fill for a table layout
> But it behaves differently from what I'd expect. I'd like to have a
> rectangle to expand to all the space it has the cell:
import gtk
import goocanvas
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
canvas = goocanvas.Canvas()
window.add (canvas)
root = canvas.get_root_item()
table = goocanvas.Table(parent=root)
text = goocanvas.Text(parent=table, text="simple text")
table.set_child_properties(text, row = 0, column = 0,)
rect = goocanvas.Rect(parent=table, height=20, fill_color="red")
table.set_child_properties(rect, row = 1, column = 0,
x_fill=True, x_expand=True, x_align=1)
but what I see is that:
1. the rectangle doesn't expand
2. the align is at the beginnning of the cell (ignoring x_align=1)
am I wrong? Should the rectangle (to which I have not set a width) expand?
sandro
--
Sandro Dentella *:-)
http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]