That's the nice thing about the inspection tool. The lower panel allows you to execute Python code on the fly. It also has intellisense. Select the object you are interested in from the top left panel (clicking the Sizer
icon on the toolbar will eliminate sizer items from the tree). Then click in the lower panel. You'll see the Size
propety in the top right panel. The currently selected object can be referred to by obj
. So in the lower panel start typing
obj.
When you type the dot you will get a popup of all valid methods and properties. Either scroll down or continue typing something like
obj.SetSize((1000,800))
and when you press enter
you will see the object resized. Very handy for trying out minor code changes or looking for the right method to use.
I frequently use
DEBUG = True
if DEBUG: import wx.lib.mixins.inspection
.
.
.
if DEBUG: wx.lib.inspection.InspectionTool().Show()
in code while I'm developing. Easy to just change it to
DEBUG = False
and just leave it in later.