Custom Widget¶
Very often you may want to use a widget that is not supported by wxGlade.
For this, just insert a Custom Widget as placeholder.
You will be prompted for a class name. In the Design and Preview windows, just a placeholder will be shown.
The *Properties* window for an example “ImagePanel” could look like this:
The generated code for this example will look like this:
Import statement at the head of the file:
# begin wxGlade: extracode
from ImagePanel import ImagePanel
# end wxGlade
Instantiation of the class:
self.panel_image_left = ImagePanel(self.main_panel, wx.ID_ANY)
The Arguments $parent and $id were replaced with the required code. There are two more magic arguments: $width and $height