DGridSizerProperties

From Dabo Wiki
Jump to: navigation, search

Properties

dGridSizer shares most of the same properties as dSizer, but also has some specific to it. These are listed first.

Only in dGridSizer

  • HGap
  • VGap
  • MaxCols
  • MaxRows
  • MaxDimension

Usage different in dGridSizer

  • Orientation

Same meaning in both dSizer and dGridSizer

  • Visible
  • Children
  • ChildWindows
  • ControllingSizer
  • ControllingSizerItem
  • Parent
  • DefaultBorder
  • DefaultBorderRight
  • DefaultBorderLeft
  • DefaultBorderTop
  • DefaultBorderBottom
  • DefaultSpacing
  • Height
  • Width
Property Frequency Used Type Description
HGap Frequently int Horizontal gap between cells. Can also be thought of as the spacing between columns.
VGap Frequently int Vertical gap between cells. Can also be thought of as the spacing between rows.
MaxCols Frequently int When adding objects to the grid sizer, controls the maximum number of columns to add before a new row is started.
MaxRows Frequently int When adding objects to the grid sizer, controls the maximum number of rows to add before a new column is started.
MaxDimension Frequently string When appending objects to the grid sizer, this property determines whether we use MaxCols or MaxRows as the limiting value before starting a new row or column.
Orientation Rarely string This is an alias for MaxDimension. It is better to use that instead, to avoid confusion with the meaning of Orientation with one-dimensional sizers.
Visible Occasionally bool Controls the visibility of all the items controlled by this sizer. In other words, setting Visible = False hides all of the items controlled by this sizer.
Children Rarely list of SizerItem objects Returns a list of all SizerItem objects for this sizer. Can be useful in some instances, but generally, ChildWindows is what you'll need.
ChildWindows Frequently list of controls Returns a list of all controls directly managed by this sizer. Ignores spacers and nested sizers.
ControllingSizer Sometimes dSizer or dGridSizer Returns a reference to the sizer that manages this sizer, or None if it is not nested inside another sizer.
ControllingSizerItem Sometimes SizerItem Returns a reference to the SizerItem the controls the layout of this sizer, or None if it is not nested inside another sizer.
Parent Rarely some UI control Returns a reference to the control that this sizer is contained in. In the case of nested sizers, it traverses the nesting to find the ultimate UI control this sizer is contained within.
DefaultBorder Sometimes int Default=0. Sets a default value for the border that will be applied to any controls added to the sizer afterwards for whom an explicit value for the border is not set. Note that it does not affect the border of items already added to the control. This property is useful when you want to add a series of items to a sizer with the same border: just set this property once, and then add your items.
DefaultBorderAll Sometimes bool Default=True. When True, the DefaultBorder property is applied to all of the sides of any controls added to the sizer. If any of the individual side properties, such as DefaultBorderTop, are set to False, this property will return False. Setting DefaultBorderAll will effectively set all of the individual side properties to that value.
DefaultBorderRight Sometimes bool Default=True. Affects whether the DefaultBorder property is applied to the Right side of controls added to the sizer.
DefaultBorderLeft Sometimes bool Default=True. Affects whether the DefaultBorder property is applied to the Left side of controls added to the sizer.
DefaultBorderTop Sometimes bool Default=True. Affects whether the DefaultBorder property is applied to the Top side of controls added to the sizer.
DefaultBorderBottom Sometimes bool Default=True. Affects whether the DefaultBorder property is applied to the Bottom side of controls added to the sizer.
DefaultSpacing Sometimes int Default=0. Sets a default value for the spacing that will be added before any controls added to the sizer afterwards. Note that it does not affect the spacing of items already added to the control. This property is useful when you want to add a series of items to a sizer with the same spacing between them: just set this property once, and then add your items.
Height Rarely int Read-Only. Returns the height in pixels of the area controlled by the sizer.
Width Rarely int Read-Only. Returns the width in pixels of the area controlled by the sizer.