Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.06 KB

s4g557.md

File metadata and controls

25 lines (16 loc) · 1.06 KB

Margin

This property of all the text-based controls lets you specify a margin that's left empty around the inside of the input area.

Usage

oObject.Margin = nMarginInPixels
nMarginInPixels = oObject.Margin

Note that the margin is measured in pixels regardless of the form's ScaleMode. Not so unreasonable, since we can't imagine wanting a margin large enough to measure in foxels.

The margin goes around all four sides of the input area. It's the part that doesn't get highlighted when you select all the text in the control.

Be careful not to make the margin too big. The control's contents disappear with no warning if the margin covers the entire area. (Keep in mind that you're actually getting twice as many pixels as you specify in each dimension, since the margin applies at both top and bottom and both right and left.)

Example

MyForm.edtNotes.Margin = 4

See Also

BorderWidth, ComboBox, EditBox, ScaleMode, Spinner, TextBox