[pygtk] trouble to resize a HPaned() widget
awalter1
alain.walter at thalesgroup.com
Wed Jun 25 18:04:56 WST 2008
Hi,
I'm trying to summarize how my trouble appears.
I've defined the following widgets :
self.frame = gtk.Frame()
self.VPaned = gtk.VPaned()
self.HPaned = gtk.HPaned()
...
self.frame.add(self.VPaned)
VPaned.add1(self.HPaned)
self.VPaned.set_position(472)
...
def resize():
print "in :",self.frame.allocation.width
self.VPaned.set_position(472)
print self.VPaned.set_position()
print "out :",self.frame.allocation.width
I'v also defined a callback on widget self.frame for resizing action.
self.frame.connect("size_allocate", self.resize)
Here-after, is the output :
in: 472
472
out: 472
in: 442
472
out: 472
The resize() procedure is called twice on callback : I think it's correct
and du to set_postion() consequences.
My problem is to understand why at the second call the value becomes 442 and
not 472 as it was after the settings.
Is somebody able to explain what is wrong and how to prevent this behavior
(i.e. predict the value 442).
Thanks a lot
--
View this message in context: http://www.nabble.com/trouble-to-resize-a-HPaned%28%29-widget-tp18108864p18108864.html
Sent from the Gtk+ - Python mailing list archive at Nabble.com.
More information about the pygtk
mailing list