Re: Gnome HPaned Position.



I've had luck with using the allocation function of widgets...

$child1Width = ${$childElement->allocation()}[2];
$child1Height = ${$childElement->allocation()}[3];

It returns a list so I'm just grabbing one item from it.

Andrew

On Mar 11,2002 10:14:55 -0500, Derek Wueppelmann <monkey monkey homeip net> 
wrote : 
On Mon, 2002-03-11 at 03:32, Pavel Rousnak wrote:
Is there a way to get the Position of the slide bar from a HPaned window
once it is created? I've just started using the GTKPerl bindings and
I've come across this small snag.
As I know, by default the position of the separator is computed according to 
requisitions of its children.  I don't know the explicit way to get the 
position but I guess it's possible to calculate it (more or less exactly :) 
from allocations of the children. 

And exampel would be good. I tried this and the width of the children
for this element seem to always report at -1. How should I get the size
of the children then? I was trying to do this

$child1Width = $childElement->width();
print "Width: $child1Width\n";

which gives:
Width: -1

-- 
o)    Derek Wueppelmann               (o
(D .    monkey monkey homeip net        D).
((`      http://monkey.homeip.net/     ( ) `

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list




Andrew Schretter
Systems Programmer, Duke University
Dept. of Mathematics (919) 660-2866







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]