Error getting tags :
error 404Error getting tags :
error 404 leftMargin | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
leftMargin
Basics
Expander triangle
Type
Property
Syntax
set the leftMargin of {button | field | group} to pixels
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Specifies how close text within an object can come to the object's left edge, and how close objects in a group can come to the group's left edge.
Examples

set the leftMargin of field "Melting Point" to 10
set the leftMargin of last button to the leftMargin of first button

Additional Comments
Expander triangle

Use the leftMargin property to change the amount of blank space between an object's left edge and its contents.

Value:

The leftMargin is a non-negative integer.

By default, the leftMargin of a newly created field is 8. If the field's wideMargins property is true, the field's leftMargin is set to 14. The default leftMargin setting for a button or group is 4.

Comments:

The leftMargin property of a field or button specifies how many blank pixels are left between the object's left edge and the left edge of its text. The leftMargin of a group specifies how far the group's left edge extends below its leftmost object.

An object's leftMargin property is equal to item 1 of its margins property.

User Comments
Expander triangle
User thumbnail
Ray Bennett
StarStarStarStarStar
Mar 9, 2010
The leftmargin can be set to a negative number. The effect is that your text will begin outside of the field off to the left. This can be useful if want to create a "marquis" effect that scrolls text off to the left in a controlled fashion by adding a -1 to the leftmargin every time you pass thru a loop.


repeat with i = 1 to the effective width of fld "theMarquis"
set the leftMargin of field "theMarquis" to (the leftMargin of field "theMarquis" -2)
end repeat


This produces a smooth scroll to the left. You can expand the idea to control the rate of the scroll in many ways. ~Ray Bennett