Crear  Editar  FrontPage  Indexes  Buscar  Cambios  History  RSS  Login

Gtk::ButtonBox

class Gtk::ButtonBox

The primary purpose of this class is to keep track of the various properties of Gtk::HButtonBox and Gtk::VButtonBox widgets.

Instance Methods

layout_style
Retrieves the method being used to arrange the buttons in a button box.
layout_style=(style)
Changes the way buttons are arranged in their container.
set_layout_style(style)
Same as Gtk::ButtonBox#layout_style=.
  • layout_style : the new layout style.
  • Returns: self
set_child_secondary(child, is_secondary)
Sets whether child should appear in a secondary group of children. A typical use of a secondary child is the help button in a dialog. This group appears after the other children if the style is Gtk::ButtonBox::START, Gtk::ButtonBox::SPREAD or Gtk::ButtonBox::EDGE, and before the the other children if the style is Gtk::ButtonBox::END. For horizontal button boxes, the definition of before/after depends on direction of the widget (see Gtk::Widget#set_direction). If the style is Gtk::ButtonBox::START or Gtk::ButtonBox::END, then the secondary children are aligned at the other end of the button box from the main children. For the other styles, they appear immediately next to the main children.
  • child: a child of widget (Gtk::Widget)
  • is_secondary : if true, the child appears in a secondary group of the button box.
  • Returns: self
get_child_secondary(child)
Returns whether child should appear in a secondary group of children. Since 2.4
  • child: a child of widget (Gtk::Widget)
  • Returns: true if the child should appear in a secondary group of children.

Constants

Style

Used to dictate the style that a Gtk::ButtonBox uses to layout the buttons it contains. (See also: Gtk::VButtonBox and Gtk::HButtonBox).

DEFAULT_STYLE
Default packing.
SPREAD
Buttons are evenly spread across the Gtk::ButtonBox.
EDGE
Buttons are placed at the edges of the Gtk::ButtonBox.
START
Buttons are grouped towards the start of box, (on the left for a Gtk::HBox, or the top for a Gtk::VBox).
END
Buttons are grouped towards the end of a box, (on the right for a Gtk::HBox, or the bottom for a Gtk::VBox).

Properties

layout-style: Integer (Read/Write)
How to layout the buttons in the box. Possible values are default, spread, edge, start and end

Style Properties

child-internal-pad-x: Integer (Read)
Amount to increase child's size on either side
  • Allowed values: >= 0
  • Default value: 4
child-internal-pad-y: Integer (Read)
Amount to increase child's size on the top and bottom
  • Allowed values: >= 0
  • Default value: 0
child-min-height: Integer (Read)
Minimum height of buttons inside the box
  • Allowed values: >= 0
  • Default value: 27
child-min-width: Integer (Read)
Minimum width of buttons inside the box
  • Allowed values: >= 0
  • Default value: 85

Child Properties

secondary: true or false (Read/Write)
If true, the child appears in a secondary group of children, suitable for, e.g., help buttons
  • Default value: false

See Also

ChangeLog

  • 2007-01-31 Applied GTK+-2.10. - Masao?
  • 2006-01-31 Revised. - Masao?
Ultimas actualizaciones:2011/06/26 02:35:01
Clave:
Referencias:[Gtk::HButtonBox] [Gtk::VButtonBox] [Gtk::ButtonBox] [Gtk]