Way to find which sizer a control is in?

  • Chelonian

    Chelonian - 2007-08-28

    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):
      class BoaApp(wx.App, InspectionMixin):    
          def OnInit(self):

      When running the application press ctrl-alt-i.


    • Riaan Booysen

      Riaan Booysen - 2007-08-29

      Hi Chelonian,

      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.


      • Chelonian

        Chelonian - 2007-08-30

        Hi Riaan,
        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 :).


    • Chelonian

      Chelonian - 2007-08-30

      Great, got it.  That's helpful.  Thanks to you both.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks