Re: [pygtk] How to get widget size
On Mon, 26 Mar 2001, Eduardo Ferro wrote: > Hi! > > I need to get the "actual" widget size of a Window, but when i > request the size with size_request() it return me the minimal size > that can use this widget :-? That is the correct behaviour for the size_request() method (it returns the ammount of space the widget requests). You want the space allocated to the widget. That can be found with the get_allocation() method: x, y, width, height = widget.get_allocation() James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
[pygtk] How to get widget size
Hi! I need to get the "actual" widget size of a Window, but when i request the size with size_request() it return me the minimal size that can use this widget :-? Someone knows how can i get this value??? Thanks in advance -- Hasta otra! Eduardo Ferro Aldama [EMAIL PROTECTED] (Linux User 44335) La web del GLUB http://glub.ehu.es/ Grupo Linux Usuarios de Bizkaia 640K ought to be enough for anybody. - Bill Gates, 1981 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] How to get widget size?
On Mon, 28 Aug 2000, Martin Grimme wrote: > Hello, > > I want to get the current size of a container widget (like GtkHBox or GtkLayout). > Is there any possibility to get these values at runtime? > > I can get the size of a window by using the configure-event, but this doesn't seem > to work for other widgets... After the widget has been allocated some space, you should be able to use the get_allocation() method. > > Please help me! > > Bye, > Martin Grimme James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] How to get widget size?
On Mon, 28 Aug 2000 11:16:28 -0400, Matt Wilson <[EMAIL PROTECTED]> wrote: > call the widget's "size_allocation()" method. This will only give you > good data after the allocation step has been done for the widget. Isn't that only for setting the size? I'd assumed that pygtk didn't have something like this widget->allocation.width/height/x/y and have been using a little C binding to get this. > > Matt > > On Mon, Aug 28, 2000 at 03:42:11PM +0200, Martin Grimme wrote: > > Hello, > > > > I want to get the current size of a container widget (like GtkHBox or GtkLayout). > > Is there any possibility to get these values at runtime? > > > > I can get the size of a window by using the configure-event, but this doesn't seem > > to work for other widgets... > > > > Please help me! > > > > Bye, > > Martin Grimme > > > > > > ___ > > pygtk mailing list [EMAIL PROTECTED] > > http://www.daa.com.au/mailman/listinfo/pygtk > > ___ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] How to get widget size?
call the widget's "size_allocation()" method. This will only give you good data after the allocation step has been done for the widget. Matt On Mon, Aug 28, 2000 at 03:42:11PM +0200, Martin Grimme wrote: > Hello, > > I want to get the current size of a container widget (like GtkHBox or GtkLayout). > Is there any possibility to get these values at runtime? > > I can get the size of a window by using the configure-event, but this doesn't seem > to work for other widgets... > > Please help me! > > Bye, > Martin Grimme > > > ___ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
[pygtk] How to get widget size?
Hello, I want to get the current size of a container widget (like GtkHBox or GtkLayout). Is there any possibility to get these values at runtime? I can get the size of a window by using the configure-event, but this doesn't seem to work for other widgets... Please help me! Bye, Martin Grimme ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] how to get widget size?
You would need to access the allocation member of the GtkWidget class, which is currently not wrapped. Expect to see it in pygtk-0.6.0 James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ On Wed, 21 Apr 1999, Rick Ree wrote: > This may be a dumb question, but how can you find out the dimensions of a > widget? I am drawing on a canvas, and would like to lay out some objects > according to how much real estate I have to work with: i.e., if the user > has maximized the window the objects will be more spread out. > > I've perused gtk.py looking for a get_size() of some such, but no luck. > > TIA > --Rick Ree > > To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] > To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] how to get widget size?
This may be a dumb question, but how can you find out the dimensions of a widget? I am drawing on a canvas, and would like to lay out some objects according to how much real estate I have to work with: i.e., if the user has maximized the window the objects will be more spread out. I've perused gtk.py looking for a get_size() of some such, but no luck. TIA --Rick Ree To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]