Re: [pygtk] Any way to retrieve the title of a dialog?
On Sat, 2003-03-15 at 14:41, Andreas Kostyrka wrote: > On Wed, Mar 12, 2003 at 06:55:18PM -0500, Steve McClure wrote: > > I need to augment titles, at runtime, of dialogs created with Glade. I > > don't see anything in the API to do a get_title, but there is a > > GtkWindow.title attribute in the GTK docs. I can't even get to > > GtkWindow attributes in my code though, I keep getting attribute errors > > when I do a dialog.window_position where dialog is a GtkDialog instance. > > > > I'm using 0.6.8 > Upgrade to pygtk2: Thanks, but that isn't really an option right now. > [EMAIL PROTECTED]:~$ python > Python 2.2.2 (#1, Jan 18 2003, 10:18:59) > [GCC 3.2.2 20030109 (Debian prerelease)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import pygtk > >>> pygtk.require("2.0") > >>> import gtk > >>> gtk.Window().title > >>> w=gtk.Window() > >>> w.set_title("TEST") > >>> w.title > 'TEST' > > Andreas > > __ > > ___ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- Steve McClure <[EMAIL PROTECTED]> Racemi, Inc. signature.asc Description: This is a digitally signed message part ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Any way to retrieve the title of a dialog?
On Sat, 2003-03-15 at 21:39, James Henstridge wrote: > Christian Reis wrote: > > >On Wed, Mar 12, 2003 at 06:55:18PM -0500, Steve McClure wrote: > > > > > >>I need to augment titles, at runtime, of dialogs created with Glade. I > >>don't see anything in the API to do a get_title, but there is a > >>GtkWindow.title attribute in the GTK docs. I can't even get to > >>GtkWindow attributes in my code though, I keep getting attribute errors > >>when I do a dialog.window_position where dialog is a GtkDialog instance. > >> > >> > > > >Use window['title']. It's a property. (Added FAQ 10.8) Thanks. > > > >Would anybody find it convenient if I posted a list of all the args for > >Gtk widgets? I had to fish it out of the source code so it might at > >least save you trying to write a custom script. Which source did you find it in? > > > > > For GTK 2.0, run "help(gtk.Window)" and you will get a list of all the > signals and properties for that class. (It will only work correctly in > Python >= 2.2.2 though. For previous releases, try "print > gtk.Window.__gdoc__"). print gtk.Window.__gdoc__: AttributeError: Window print gtk.GtkWindow.__gdoc__: AttributeError: __gdoc__ print gtk.GtkWindow.__doc__: None Thanks again folks, I really appreciate the help. > > James. -- Steve McClure <[EMAIL PROTECTED]> Racemi, Inc. signature.asc Description: This is a digitally signed message part ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Any way to retrieve the title of a dialog?
Christian Reis wrote: On Wed, Mar 12, 2003 at 06:55:18PM -0500, Steve McClure wrote: I need to augment titles, at runtime, of dialogs created with Glade. I don't see anything in the API to do a get_title, but there is a GtkWindow.title attribute in the GTK docs. I can't even get to GtkWindow attributes in my code though, I keep getting attribute errors when I do a dialog.window_position where dialog is a GtkDialog instance. Use window['title']. It's a property. (Added FAQ 10.8) Would anybody find it convenient if I posted a list of all the args for Gtk widgets? I had to fish it out of the source code so it might at least save you trying to write a custom script. For GTK 2.0, run "help(gtk.Window)" and you will get a list of all the signals and properties for that class. (It will only work correctly in Python >= 2.2.2 though. For previous releases, try "print gtk.Window.__gdoc__"). James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Any way to retrieve the title of a dialog?
On Wed, Mar 12, 2003 at 06:55:18PM -0500, Steve McClure wrote: > I need to augment titles, at runtime, of dialogs created with Glade. I > don't see anything in the API to do a get_title, but there is a > GtkWindow.title attribute in the GTK docs. I can't even get to > GtkWindow attributes in my code though, I keep getting attribute errors > when I do a dialog.window_position where dialog is a GtkDialog instance. Use window['title']. It's a property. (Added FAQ 10.8) Would anybody find it convenient if I posted a list of all the args for Gtk widgets? I had to fish it out of the source code so it might at least save you trying to write a custom script. Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Any way to retrieve the title of a dialog?
On Wed, Mar 12, 2003 at 06:55:18PM -0500, Steve McClure wrote: > I need to augment titles, at runtime, of dialogs created with Glade. I > don't see anything in the API to do a get_title, but there is a > GtkWindow.title attribute in the GTK docs. I can't even get to > GtkWindow attributes in my code though, I keep getting attribute errors > when I do a dialog.window_position where dialog is a GtkDialog instance. > > I'm using 0.6.8 Upgrade to pygtk2: [EMAIL PROTECTED]:~$ python Python 2.2.2 (#1, Jan 18 2003, 10:18:59) [GCC 3.2.2 20030109 (Debian prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pygtk >>> pygtk.require("2.0") >>> import gtk >>> gtk.Window().title >>> w=gtk.Window() >>> w.set_title("TEST") >>> w.title 'TEST' Andreas pgp0.pgp Description: PGP signature ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/