How to get the the current size of a widget?

2006-06-02 Thread heavenscape
I am displaying a image in my main window, and I want it to automatically resize with the main window. Can anyone tell me how to get the current size of the main window or any widget from within a callback? Regards! -- View this message in context: http://www.nabble.com/How-to-get-the-the-curren

Re: GObject and floating reference count

2006-06-02 Thread Chris Vine
On Wednesday 31 May 2006 15:15, Tristan Van Berkom wrote: > Hannes Mayr wrote: > > Hello, > > > > I'm a little bit confused about the explanation of the floating > > reference count. > > > > The documentation says about GObject: > > "The initial reference a GObject is created with is flagged as a >

Re: GtkIconView: reorderable and enable_mode_drag_dest incompatible?

2006-06-02 Thread tomas
Answering to my own question: On Thu, Jun 01, 2006 at 05:17:01PM +, [EMAIL PROTECTED] wrote: > Hi, GTK gurus [...] > My problem is that I can't manage to keep the thing reorderable *and* > accept drops from other apps. Here are the relevant lines: [...] > Can I have both? Having had a look at

Re: How to get the the current size of a widget?

2006-06-02 Thread Luis Menina
Use the "configure-event" event... It's not well documented in GTK doc: http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#GtkWidget-configure-event But the pygtk help tells it's called when the window changes its size http://pygtk.org/pygtk2reference/class-gtkwidget.html#signal-gtkwidget

MySQL + GTK

2006-06-02 Thread guillaume
Hi all, Can somebody learn me how to fill a treeview with the contents of a mysql table? We don't know the table number of rows cause the tree may show different tables while clicking on the different buttons of my app :) Thank you for answering (or even just for takin the time to read) me ;-) G

Re: MySQL + GTK

2006-06-02 Thread Guy Rouillier
[EMAIL PROTECTED] wrote: > Hi all, > > Can somebody learn me how to fill a treeview with the contents of a mysql > table? We don't know the table number of rows cause the tree may show > different tables while clicking on the different buttons of my app :) Have you used a GtkTreeView before? Not

[Fwd: Re: How to get the the current size of a widget?]

2006-06-02 Thread James Scott Jr
Luis If you look at the GtkWidget structure you will find it contains an GtkAllocation allocation, which is a simple rectangle. It is set to the widget's current size by the configure or realize event of all widgets. You can use its value reliably almost anytime after the gtk_main() has had an