textShift

Typeproperty
DictionaryLCS
LibraryLiveCode Script
Syntax
set the textShift of <chunk> of <field> to <pixels>
Associationsfield
Summary

Specifies how far text is shifted up or down from its baseline.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
set the textShift of last char of word 2 of field 1 to 3 -- subscript
set the textShift of char 12 of the selectedField to -1 -- superscript
Values
NameTypeDescription
Value

The textShift of a chunk of a field is an integer. By default, the textShift property of newly created fields is set to zero.

RelatedKeyword: field, integer
Property: fixedLineHeight, pixels, textHeight
Object: field
Glossary: property, chunk, negative
Description

Use the textShift property to subscript and superscript chunks of text in a field.

The textShift is the number of pixels to shift the text down from the baseline, creating a subscript. If the textShift is negative, the text is shifted up (superscripted). If the textShift is zero, the text is placed in normal position, not shifted up or down.

Note: If the field's fixedLineHeight property is true, you may need to increase the field's textHeight to make room for subscripts and superscripts.

Tagsui