This step is more or less the same as step 3:
“wxGladeFrame.add_object
” is called
in response to a button click
when the user ``drops'' the widget inside a slot in a sizer,
the method “drop_widget
” of
edit_sizers.SizerSlot
is called, which in turn calls
the appropriate factory function with arguments
“self.parent
”,
“self.sizer
” and
“self.pos
” (i.e. the parent, sizer and
position inside the sizer of the slot that will be replaced).
Factory functions of non-toplevel objects call, apart from
“common.app_tree.insert
” to insert the
object in the tree, the method
“add_item
” of
“edit_sizers.SizerBase
”, to add
the object to the sizer and to remove the slot. For managed
widgets/sizers, the “__init__
”
method also builds the Properties which control the layout of the
object inside a sizer, and stores them in the
“self.sizer_properties
” dictionary.