2.443 .ymargin
This attribute determines the distance of the children (layoutbox) or the content (edittext, poptext, image) from the top and bottom edges of the object.
Definition
-
Data type
integer
-
Access
get, set
-
changed event
yes
Value range |
0…65536 |
Default value |
0 |
With this attribute, the upper and lower distance between the edges of the layoutbox and the children can be set.
The attribute specifies the vertical distance from the edge (border) to the actual content of an image object in pixels. Changes to the ymargin value always affects the distance to the top margin and to the bottom margin.
See also
The attribute specifies the distance between the text and the border in pixels. Changes of the .ymargin value affect the distance from the top and bottom border. Moreover, with .height = 0 and .yauto <> 0 a change of the attribute influences the height of the object.
The value range is ‑127…127. The default value is 5.
On Microsoft Windows the edittext does not support this attribute.
The poptext object on Motif 2.x and from IDM version A.05.02.d supports the attributes .xmargin and .ymargin to influence the horizontal and vertical distance between the text and the outside borders.
Since the poptext on Motif is a compound object, the attributes influence the distance between the text and the text field frame and therefore only has an indirect effect on the distance between the text field and the outside borders. The .ymargin attribute influences the height of the poptext when no height is specified (.height = 0 and .yauto <> 0). Too high values can lead to the text not being visible with predetermined heights. The .xmargin attribute however is also effective when a width is specified and adjusts the displayed text area and distance to the border. For negative attribute values, the default values of the system are used.
Particularities
- The text field frame on Motif normally is only visible for the styles edittext and listbox.
- The value -2 for .xmargin and .ymargin is a compatibility mode to the precedent version which had a slightly different height calculation and text positioning for .height = 0.
- The default value is 5 and therefore different from the Windows platforms.