LensStudio:Ui.Alignment
EnumEnum specifying text or widget alignment.
Index
Enumeration Members
Example
const Ui = await import('LensStudio:Ui');
const layout = new Ui.BoxLayout();
const root = null as unknown as import('LensStudio:Ui').Widget;
const label = new Ui.Label(root);
label.text = 'Centered label';
layout.addWidgetWithStretch(label, 1, Ui.Alignment.AlignCenter);
const rightLabel = new Ui.Label(root);
rightLabel.text = 'Right-aligned';
layout.addWidgetWithStretch(rightLabel, 0, Ui.Alignment.AlignRight);
console.log(`Alignment.AlignCenter=${Ui.Alignment.AlignCenter}, AlignRight=${Ui.Alignment.AlignRight}`);
Enumeration Members
AlignAbsolute
AlignAbsolute:
number
Absolute positioning alignment.
AlignBaseline
AlignBaseline:
number
Align to baseline.
AlignBottom
AlignBottom:
number
Align to the bottom.
AlignCenter
AlignCenter:
number
Align to center.
AlignHCenter
AlignHCenter:
number
Align horizontally to center.
AlignHorizontal_Mask
AlignHorizontal_Mask:
number
Mask for horizontal alignment flags.
AlignJustify
AlignJustify:
number
Justify alignment.
AlignLeading
AlignLeading:
number
Align to the leading edge (start).
AlignLeft
AlignLeft:
number
Align to the left.
AlignRight
AlignRight:
number
Align to the right.
AlignTop
AlignTop:
number
Align to the top.
AlignTrailing
AlignTrailing:
number
Align to the trailing edge (end).
AlignVCenter
AlignVCenter:
number
Align vertically to center.
AlignVertical_Mask
AlignVertical_Mask:
number
Mask for vertical alignment flags.
Default
Default:
number
Default alignment value.