I've been trying a few tricks with rad tools to generate xrc
but i'm not quite sure how really things should be in the python language.
I've went through some samples. but the samples is just ain't enough.
it only shows poping out a window and that's it...
but how do i return the button from the xrc file?
i'll need to run some function when someone click on the button which resides in the wxboxsizer that comes from xrc file.
button = XRCCTRL(parent_window, "button_name")
and i've found out there is a problem with the way the xrc is arranged.
eg: wxframe (name: myframe) -> wxpanel(name:mypanel) -> ...
when i tried to loadpanel("mypanel")
wx runtime will gives out mypanel not found
if the root itself starts with wxpanel without the frame
eg: wxpanel(name:mypanel) -> ...
it runs just fine
y is it this way? is there some kind of loadpanel("myframe.mypanel")?
I don't know, Vaclav?
------next-------<>
i've another issue,
in wxwindows (cpp) version, casting a wxpanel to wxwindow or wxframe to wxwindow is an easy job: xyz = (wxWindow *)(abc)
but how do i cast it in python?
There's wxPyTypeCast that was created as a downcast hack to work around a problem. But why would you need to upcast? wxPanel and wxFrame inherit everything from wxWindow already...
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!