Yast UI
YAlignment Class Reference

Layout alignmentOptional Argument: BackgroundPixmap( "dir/pixmap.png" ) background pixmap. More...

Detailed Description

Layout alignment

Optional Argument: BackgroundPixmap( "dir/pixmap.png" ) background pixmap.

Margins around one child widget.

Layout minimum size.

Following widget variants exist: Left Right Top Bottom HCenter VCenter HVCenter Id of widget: Alignment

The Alignment widgets are used to control the layout of a dialog. They are useful in situations, where to a widget is assigned more space than it can use. For example if you have a VBox containing four CheckBoxes, the width of the VBox is determined by the CheckBox with the longest label. The other CheckBoxes are centered per default.

With Left( widget ) you tell a widget that it should be laid out leftmost of the space that is available to it. Right, Top and Bottom are working accordingly. The other three widgets center their child widget horizontally, vertically or in both directions.

As a very special case, alignment widgets that have Opt(:hvstretch) (and related) set promote their child widget's stretchability to the parent layout. I.e., they do not align a child that is stretchable in that dimension, but stretch it to consume the available space. This is only very rarely useful, such as in very generic layout code where the content of an alignment widget is usually unknown, and it might make sense to, say, center a child that is not stretchable, and OTOH to stretch a child that is stretchable.

An optional background pixmap can be specified as the first argument. UIs that support background pixmaps will then use the specified file as a (tiled) backgound image.

If that name does not start with "/" or ".", the theme path ("/usr/share/YaST2/theme/current/") will be prepended.

Following widget variants exist: MinWidth MinHeight MinSize Id of widget: MinSize

This widget makes sure its one child never gets less screen space than the specified amount. It implicitly makes the child stretchable in that dimension.

Following widget variants exist: MarginBox Id of widget: MarginBox

This widget is a shorthand to add margins to the sides of a child widget (which may of course also be a VBox or a HBox, i.e. several widgets).

Unlike more complex constructs like nested VBox and HBox widgets with VSpacing and HSpacing at the sides, the margins of a MarginBox have lower layout priorities than the real content, so if screen space becomes scarce, the margins will be reduced first, and only if the margins are zero, the content will be reduced in size.


The documentation for this class was generated from the following file: