[Glade-users] Glade and Python. Newbie needs help to access widget and hide windows.
- From: hans deragon biz (Hans Deragon)
- Subject: [Glade-users] Glade and Python. Newbie needs help to access widget and hide windows.
- Date: Sun, 27 Jul 2003 18:45:55 -0400
Greetings.
This is probably a FAQ, but I search the web and could not find any
information on what I am searching for. It seams that usage of Glade with
Python is not documented extensively.
I use PyGTK bindings to access an interface created with Glade 2.0.0. I get
my application running, but I have the following problem:
1) How can I access a particular widget. I have two radio
buttons named RadioStatusEnabled and RadioStatusDisable.
They are defined in the xml file, but how do I get their
value in python?
In other words, I am looking for something like:
rdEnabled = ?????.getWidget("RadioStatusEnabled")
And once I have rdEnabled, how can I find out what functions are
available? What can I call on that object? I assume that the functions
in python would have the same name as the one in C, but am I right?
2) In Glade, I created a GtkWindow, a GtkDialog and a GnomeAbout. When I
run my program, all 3 windows pop up on the screen. How can I tell
python to only show the main GtkWindow on startup?
Here is the piece of code I am running:
gnome.init("autopoweroff", "2.0.0")
xml = gtk.glade.XML('autopoweroff.glade')
xml.signal_autoconnect(locals())
gtk.main()
Sincerely,
Hans Deragon
--
Deragon Informatique inc. Open source:
http://www.deragon.biz http://swtmvcwrapper.sourceforge.net
mailto://hans deragon biz http://autopoweroff.sourceforge.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]