Stack order and raise_
- From: Alessandro Dentella <sandro e-den it>
- To: goocanvas-list gnome org
- Subject: Stack order and raise_
- Date: Tue, 22 Sep 2009 10:14:45 +0200
Hi,
I have problems with raise_(None). From the docs I read:
def raise_(above)
above : the item to raise item above, or NULL to raise item
to the top of the stack.
if I use None, nothing happens, the yellow rectangle of the example below
doesn't raise it's position.
If I set raise_(r2) I get goocanvas critical error:
GooCanvas-CRITICAL **: goo_canvas_item_raise: assertion `above_pos != -1' failed
The code I'm using is::
import gtk
import goocanvas as goo
w = gtk.Window()
c = goo.Canvas()
w.add(c)
root = c.get_root_item()
g1 = goo.Group(parent=root)
g2 = goo.Group(parent=root)
r1 = goo.Rect(parent=g1, width=100, height=100,
fill_color='gray80', stroke_color='gray80')
r2 = goo.Rect(parent=g2, width=100, height=100,
fill_color='gray90', stroke_color='gray90', x=100)
r1_1 = goo.Rect(parent=g1, width=100, height=100, fill_color='yellow', x=50)
#r1_1.raise_(None)
r1_1.raise_(r2)
w.resize(220,120)
w.show_all()
gtk.main()
Is there some limit that is not written in the docs?
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]