wxPython also supports designer-like layout mechanisms using XML-based resource files, called XRC, that are supported by several wx-centric IDEs, such as XRCed, wxFormBuilder, and DialogBlocks. XRC uses hierarchical XML data to construct a window layout. This recipe will show you how to get started with XRC by building up a simple dialog.
We will start by going through an example XRC file that will be used to build a dialog. The first part will declare the dialog and a Sizer to lay out the contents of the dialog. Take a look at this code:
<?xml version="1.0" ?> <resource> <object class="wxDialog" name="xrctestdlg"> <title>Xrc Test Dialog</title> <style>wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</style> <object class="wxBoxSizer"> <orient>wxVERTICAL</orient> <object class="spacer"> <option>1</option> <flag>wxEXPAND</flag...