2.431 .xmargin

This attribute determines the distance of the children (layoutbox) or the content (edittext, poptext, image) from the left and right edges of the object.

Definition

  • Data type

    integer

  • Access

    get, set

  • changed event

    yes

layoutbox

Value range

0…65536

Default value

0

With this attribute the right and left distance between the edges of the layoutbox and the children can be set.

image

The attribute specifies the horizontal distance from the edge (border) to the actual content of an image object in pixels. Changes to the xmargin value always affects the distance to the left margin and to the right margin.

See also chapter “HighDPI Support” in manual “Programming Techniques”

Since IDM version A.06.03.a

edittext

The attribute specifies the distance between the text and the border in pixels. Changes of the .xmargin value affect the distance from the left and right border. Moreover, with .width = 0 and .xauto <> 0 a change of the attribute influences the width of the object.

The default values of this attribute vary for the different window systems. The default value for Motif is 5, that for Microsoft Windows is 1. The value range is ‑127…127.

On Microsoft Windows, additionally the attribute .options[opt_et_margin] of the dialog has to be set to false (default) for the .xmargin attribute to be considered. Also on Microsoft Windows and depending on the patch level, it may occur that the right margin is ignored with overlong texts in single-line edittexts.

poptext

Microsoft Windows

The poptext adheres to the attribute .xmargin with the styles edittext and listbox. The behavior corresponds to the behavior of the edittext (described above).

Motif

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