Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi,
Just a couple of observations. You have:
In order to centralise the red bar, I find that I need to specify that as TRUE. It seems to me that you haven't specified any size for the canvas, and that it would therefore be expected to be the default size of (100, 100). You have specified a window size of (500, 500) and $window->get_size() does, indeed, return (500, 500). You might also try the gtk-perl mailing list for some assistance, given that good help from this forum is a little slow in coming. Update: On re-reading your post, I see that I haven't really told you much that you hadn't already worked out for yourself. Sorry 'bout that. It does seem that the slight off-centredness that you see is because the red bar is specified to be between 20 and $width-40. Change that to x2 => ($width - 20) and it should be centred. Alternatively, specify x1 => 40 and you'll also achieve centring (though the red bar will then be shorter by 20). I don't know how to centre a non-default size canvas. I expected this to work:
but the canvas size is still (100, 100).So I tried:
and the canvas size is then the specified (400, 100) but "centred" for a canvas size of (100, 100) and therefore completely off centre. Cheers, Rob In reply to Re: Can't position Gnome2::Canvas within Gtk2::Frame
by syphilis
|
|