public abstract class ButtonBox extends Box
HButtonBoxto lay buttons out horizontally or a
VButtonBoxto lay buttons out vertically.
Buttons are packed into a ButtonBox the same way widgets are added to any
other Container, using
add(). You can also
packEnd(), but for ButtonBoxes both these
functions work just like
add(), ie., they pack the button in a
way that depends on the current layout style and on whether the button has
setChildSecondary() called for it.
The layout/spacing can be altered in a programmatic way in order to alter
the 'feel' of a program to a small degree, although in general overriding
the defaults used by every other application on the desktop will impact the
user's experience and so is not recommended. If you do need to make
adjustments, the arrangement and layout of the Buttons can be changed with
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent
|Modifier and Type||Method and Description|
Returns whether child should appear in a secondary group of children.
Returns the method currently being used to govern arrangement child Buttons in this ButtonBox.
Change the way the child Buttons are arranged in this ButtonBox.
getOrientation, getSpacing, packEnd, packStart, reorderChild, setOrientation, setSpacing
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll
public boolean getChildSecondary(Widget child)
child- a widget that is a child of this button box
public ButtonBoxStyle getLayout()
public void setChildSecondary(Widget child, boolean isSecondary)
childshould appear in the "secondary" group of children. A typical use of the secondary child mechanism is to place the 'Help' Button in a Dialog; placing it on the far left side while the 'Ok' and 'Cancel' Buttons are on the far right.
The secondary group appears after the other children if the
EDGE, and before the other children if the it is
END. For horizontal ButtonBoxes, the
definition of before/after depends on direction in place (see
setDirection() on Widget).
If the style is
END, then the secondary children are aligned
at the other end of the ButtonBox from the main children. For the other
styles, they appear immediately next to the main children.
child- a Widget that is a child of this ButtonBox
true, the child appears in a secondary group of the ButtonBox
public void setLayout(ButtonBoxStyle layout)