gre.to_alignment
gre.to_alignment(
alignment
)
Generate a numeric alignment value based on a symbolic, case sensitive, alignment string
Parameters
| Parameter | Type | Description |
|---|---|---|
alignment | #string | A string value of "left", "right", "center", "top", "bottom". |
Returns
| Type | Description |
|---|---|
| #number | A 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)