Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Way to find which sizer a control is in?

Help
Chelonian
2007-08-28
2013-05-01
  • 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.

     
    • 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):
              InspectionMixin.Init(self)

      When running the application press ctrl-alt-i.

      Werner

       
    • 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.

      Cheers,
      Riaan.

       
      • 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,
        Che

         
        • 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 :).

          Werner

           
    • Chelonian
      Chelonian
      2007-08-30

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