XRC and wxPython

A

Austin

I've seen the examples about xrc and wxpython. Most examples demostrate one
frame or dialog and use menubar or button to produce events. I met a
problem.
-------------------------------------------------
sample.xrc
<?xml version="1.0" ?>
<resource>
<object class="wxFrame" name="MainFrame">
<title>Simple Test</title>
<object class="wxButton" name="Button1">
<label>hi</label>
</object>
</object>
</resource>

close.xrc
<?xml version="1.0" ?>
<resource>
<object class="wxDialog" name="DIALOG1">
<title>close</title>
<object class="wxButton" name="CloseButton">
<label>close</label>
</object>
</object>
</resource>

-----------------------------------------------
sample is a frame, and close is a dialog. Assume that ex.(sample.py) is a
main program. When you click Button1, it will show the dialog ex.(close.py).
And you click close button in close.py, it will close but the main frame
still exists. Because most examples don't show how to open another dialog, i
try to write codes referenced by the examples but it's doesn't work. Could
anybody show me the examples used those two xrc files or some other useful
websites? Thanks a lot.
 
D

Dennis Benzinger

Austin said:
[snipped some sample xrc files]
-----------------------------------------------
sample is a frame, and close is a dialog. Assume that ex.(sample.py) is a
main program. When you click Button1, it will show the dialog ex.(close.py).
And you click close button in close.py, it will close but the main frame
still exists.

Do I understand correctly that the close button in the dialog should
close the whole application?
Because most examples don't show how to open another dialog, i
try to write codes referenced by the examples but it's doesn't work. Could
anybody show me the examples used those two xrc files or some other useful
websites? Thanks a lot.

I don't have examples at hand but if you show your code I could help you
further.


Dennis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top