to get the objects that represent the various controls. I thought it
might be nice to do that automatically, e.i. to add all the controls
to my class (derived from wxFrame). There's a way to do that for C++
with wxrc, but I have found no way to do that with Python. I thought
maybe enumerating the controls in the XmlResource and creating a
variable for each one on the fly, or maybe map it to a dictionary. But
I can't find a way to enumerate the controls in XmlResource.
Any ideas?
Eli.
P.S. I am a bit new to both Python and wxPython so bear with me if
what I'm saying makes no sense at all..
to get the objects that represent the various controls. I thought it
might be nice to do that automatically, e.i. to add all the controls
to my class (derived from wxFrame). There's a way to do that for C++
with wxrc, but I have found no way to do that with Python. I thought
maybe enumerating the controls in the XmlResource and creating a
variable for each one on the fly, or maybe map it to a dictionary. But
I can't find a way to enumerate the controls in XmlResource.
Any ideas?
Probably the only way to do it right now is to write some code to parse the .xrc code and to generate from that some Python code that does what you need. If you or somebody comes up with something that is generally useful I wouldn't mind adding it to the wx.tools package and scripts.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
to get the objects that represent the various controls. I thought it
might be nice to do that automatically, e.i. to add all the controls
to my class (derived from wxFrame). There's a way to do that for C++
with wxrc, but I have found no way to do that with Python. I thought
maybe enumerating the controls in the XmlResource and creating a
variable for each one on the fly, or maybe map it to a dictionary. But
I can't find a way to enumerate the controls in XmlResource.
Any ideas?
Probably the only way to do it right now is to write some code to parse the .xrc code and to generate from that some Python code that does what you need. If you or somebody comes up with something that is generally useful I wouldn't mind adding it to the wx.tools package and scripts.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org