Skip to main content
Version: 9.0.3

gre.to_alignment

gre.to_alignment(
alignment
)

Generate a numeric alignment value based on a symbolic, case sensitive, alignment string

Parameters​

ParameterTypeDescription
alignment#stringA string value of "left", "right", "center", "top", "bottom".

Returns​

TypeDescription
#numberA numeric value for alignment corresponding to gre.LEFT, gre.RIGHT, gre.CENTER, gre.TOP or gre.BOTTOM.

Example​

-- Set an alignment variable to be left aligned
local alignment = gre.to_alignment("left")
gre.set_value("myLayer.myControl.horizontalAlignment", alignment)