Esempio n. 1
0
    def create_grid_layout ( self, rows = 0, columns = 1, v_margin = 0,
                                   h_margin = 0 ):
        """ Returns a new GUI toolkit neutral grid layout manager which
            supports a (rows,columns) sized grid, with each grid element
            having (v_margin,h_margin) pixels of space around it.

            If rows is 0, the number of rows is not predefined, but will be
            determined by the actual number of controls added to the layout.
        """
        return layout_adapter(
            wx.FlexGridSizer( rows, columns, v_margin, h_margin )
        )
Esempio n. 2
0
 def create_groupbox_layout ( self, is_vertical, parent, label, owner ):
     """ Returns a new GUI toolkit neutral vertical layout manager for a
         groupbox.
     """
     gbox       = wx.StaticBox( as_toolkit_control( parent ), -1, label )
     gbox.owner = owner
     return (
         None,
         layout_adapter(
             wx.StaticBoxSizer( gbox, orientation_map[ is_vertical ] ),
             is_vertical
         )
     )
Esempio n. 3
0
 def create_box_layout ( self, is_vertical = True, align = '' ):
     """ Returns a new GUI toolkit neutral 'box' layout manager.
     """
     return layout_adapter(
         wx.BoxSizer( orientation_map[ is_vertical ] ), is_vertical
     )
Esempio n. 4
0
 def create_layout ( self, layout ):
     """ Creates a new GUI toolkit neutral layout manager for the specified
         GUI toolkit specific layout manager or implementor of the
         IAbstractLayout interface.
     """
     return layout_adapter( layout )