The SizedControl
library, in addition to simplifying the layout of panels, also provides some integrated solutions for dialogs. Internally, SizedDialog
uses SizedPanel
to manage its controls as well as support the layout for StdDialogButtonSizer
. This recipe will take a look at using SizedDialog
to show how to quickly and easily build custom dialogs.
Ensure that you have taken a look at the previous recipe in this chapter, Simplifying the panel layout, before moving on to the rest of this recipe as this recipe heavily makes use of the content covered in the preceding one.
You need to perform the following steps:
In this recipe, we will mock up a dialog to configuring proxy settings. The first step is to derive a class from
SizedDialog
:class ProxyConfigDlg(sized.SizedDialog): def __init__(self, parent, title): super(ProxyConfigDlg, self).__init__(parent, title=title)
Now, we need to set up the type of layout by getting a reference...