Gtk.Misc¶
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
d/r/w |
The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts. |
||
d/r/w |
The amount of space to add on the left and right of the widget, in pixels |
||
d/r/w |
The vertical alignment, from 0 (top) to 1 (bottom) |
||
d/r/w |
The amount of space to add on the top and bottom of the widget, in pixels |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
widget |
r |
Class Details¶
- class Gtk.Misc(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
The
Gtk.Misc
widget is an abstract widget which is not useful itself, but is used to derive subclasses which have alignment and padding attributes.The horizontal and vertical padding attributes allows extra space to be added around the widget.
The horizontal and vertical alignment attributes enable the widget to be positioned within its allocated area. Note that if the widget is added to a container in such a way that it expands automatically to fill its allocated area, the alignment settings will not alter the widget’s position.
Note that the desired effect can in most cases be achieved by using the
Gtk.Widget
:halign
,Gtk.Widget
:valign
andGtk.Widget
:margin
properties on the child widget, soGtk.Misc
should not be used in new code. To reflect this fact, allGtk.Misc
API has been deprecated.- get_alignment()[source]¶
- Returns:
- Return type:
Gets the X and Y alignment of the widget within its allocation. See
Gtk.Misc.set_alignment
().Deprecated since version 3.14: Use
Gtk.Widget
alignment and margin properties.
- get_padding()[source]¶
- Returns:
- Return type:
Gets the padding in the X and Y directions of the widget. See
Gtk.Misc.set_padding
().Deprecated since version 3.14: Use
Gtk.Widget
alignment and margin properties.
- set_alignment(xalign, yalign)[source]¶
- Parameters:
Sets the alignment of the widget.
Deprecated since version 3.14: Use
Gtk.Widget
's alignment (Gtk.Widget
:halign
andGtk.Widget
:valign
) and margin properties orGtk.Label
'sGtk.Label
:xalign
andGtk.Label
:yalign
properties.
- set_padding(xpad, ypad)[source]¶
- Parameters:
Sets the amount of space to add around the widget.
Deprecated since version 3.14: Use
Gtk.Widget
alignment and margin properties.
Property Details¶
- Gtk.Misc.props.xalign¶
- Name:
xalign
- Type:
- Default Value:
0.5
- Flags:
The horizontal alignment. A value of 0.0 means left alignment (or right on RTL locales); a value of 1.0 means right alignment (or left on RTL locales).
Deprecated since version 3.14: Use
Gtk.Widget.set_halign
() instead. If you are usingGtk.Label
, useGtk.Label
:xalign
instead.
- Gtk.Misc.props.xpad¶
- Name:
xpad
- Type:
- Default Value:
0
- Flags:
The amount of space to add on the left and right of the widget, in pixels.
Deprecated since version 3.14: Use
Gtk.Widget.set_margin_start
() andGtk.Widget.set_margin_end
() instead
- Gtk.Misc.props.yalign¶
- Name:
yalign
- Type:
- Default Value:
0.5
- Flags:
The vertical alignment. A value of 0.0 means top alignment; a value of 1.0 means bottom alignment.
Deprecated since version 3.14: Use
Gtk.Widget.set_valign
() instead. If you are usingGtk.Label
, useGtk.Label
:yalign
instead.
- Gtk.Misc.props.ypad¶
- Name:
ypad
- Type:
- Default Value:
0
- Flags:
The amount of space to add on the top and bottom of the widget, in pixels.
Deprecated since version 3.14: Use
Gtk.Widget.set_margin_top
() andGtk.Widget.set_margin_bottom
() instead