Re: goocanvas.Table: segfaults adding group
- From: Alessandro Dentella <sandro e-den it>
- To: Damon Chaplin <damon karuna eclipse co uk>
- Subject: Re: goocanvas.Table: segfaults adding group
- Date: Fri, 18 Sep 2009 14:02:46 +0200
On Wed, Sep 16, 2009 at 05:18:58PM +0100, Damon Chaplin wrote:
>
> On Tue, 2009-09-15 at 19:14 +0200, Alessandro Dentella wrote:
>
> > > You can embed tables inside tables though.
> >
> > But I realize taht in that case you can only use the layout feature of
> > Table, no longer of Group (i.e. not positioning via x,y).
>
> Yes, you have to use the child properties like "left-padding" instead.
> It is more flexible than just the x & y coordinates though.
You're right, it's more flexible.
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 imposed a width) expand?
thanks again
sandro
*:-)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]