Is there a way in Boa to be able do (something like) right click on a control in the Designer and quickly find which sizer is controlling it, and possibly whether that sizer is embedded in other sizers? Something like this would be (is?) useful when one has many sizers and sizers within sizers and wants to change the layout properties of one's frame. Thanks.
Werner F. Bruhin
Not within Boa, but you can use the wxPython mixin to see this when running the application.
Change the code as follows:
from wx.lib.mixins.inspection import InspectionMixin
class BoaApp(wx.App, InspectionMixin):
When running the application press ctrl-alt-i.
Yes, there is a way.
Select the control in the Designer, if it is part of a sizer the selection tags around the control
will be green. If you right-click on a green selection tag, you may select the sizer or sizer item
from the popup menu.
I tried it, but I am having some trouble. I see that there are green boxes (these are the selection tags?) around the various controls that are in sizers, but if I right-click on them, the popup menu does not have any entry for sizer or sizer item. It has "Fit Sizer" and "Size..." but clicking on "Size..." doesn't seem to do anything and I'm not sure what Fit Sizer does. I'm not sure what I am doing wrong. I have Boa 0.6.1.
Thanks for the help,
Werner F. Bruhin
You need to click on the green squares, i.e. when the resize cursor is shown (double ended arrow).
Riaan, it would be nice if this item could be added to the standard right click menu and just be in-active if there is no sizer :).
Great, got it. That's helpful. Thanks to you both.