Name
SetMargins -- define the margins for printed text
Synopsis
SetMargins(left, right[, noclip])
Function
This function allows you to define the margins that shall be used for printing text using the Print() function. This is very useful if you only want to print text in a specific area of your display. The left argument specifies the left end of the margin and the right argument is the right end of the margin. Words exceeding those margins will automatically be wrapped to the next line.

The default setting for left is 0 and for right the default setting is your display width minus 1.

By default, the margins you specify in left and right will be clipped against the display's boundaries. If you don't want that, you can set the optional noclip argument to True. If noclip is True, left can also be less than 0 and right can be greater than the display width.

Inputs
left
left edge of the margin (in pixels)
right
right edge of the margin (in pixels)
noclip
optional: set this to True if left and right edges of the margin shouldn't be clipped to the display's boundaries (V9.0)
Example
SetMargins(200, 300)
Print("Hello World. This is my first program using margins.")
The above code defines the margins 200 and 300, which means that text output will only be made between pixels 200 and 300. Then it prints some text.

Show TOC