Widget Layout

Help
Andrew
2006-07-21
2013-05-01
  • Andrew

    Andrew - 2006-07-21

    Hello,
      I seem to have a problem with widget layout using sizers.  Within boa I can use a gridbagsizer to add all my widgets correctly and the preview of the frame within boa appears correctly.  When I run the actual python code the widets are scattered across the frame but when I resize the window they all line up according to the gridbagsizer.  How do I force the frame to automatically line the widgets with the gridbagsizer without having to resize the frame?
      Thanks
      Andrew

     
    • Werner F. Bruhin

      Are you doing:

      self.SetSizer(self.yourgridbagsizer)

      In the Boa Frame designer, select the your frame and on the Props tab towards the end is a "Sizer" property, when you set it Boa will generate the above for you.

      Werner

       
    • Andrew

      Andrew - 2006-07-24

      Hello Werner,
        Yes, I have called self.SetSizer() via the frame designer as you suggested.  Is there a way to force the gridbagsizer to update so that everything lines up?
        Thanks
        Andrew

       
      • Werner F. Bruhin

        Hi Andrew,

        You should not have to do anything to have sizers do their job, at least in most cases.

        Can you post as an attachement some runable code showing your problem? 

        Can you send it to:
        Boa-constructor-users@lists.sourceforge.net

        This list is mirrored on gmane (gmane.comp.ide.boa-constructor.user), which allows for nice and easy off-line work.

        You might also want to look into the wx.Sizer methods:

        - Layout
        - Fit
        - FitInside

        Werner

         
    • Andrew

      Andrew - 2006-07-25

      I'll try to minimize the code (its a bit bloated now) and then post a link to a tar ball.
        Thanks
         Andrew

       

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks