Skip to end of metadata
Go to start of metadata

If an object has a graphical representation (see hasGraphic) and a name label, the text in this label can be aligned left, center or right. The labelAlignment method returns the current alignment setting: 

<alignment> = <object>. labelAlignment()

<object>

A value of the type Object or an expression evaluating to a value of that type. The object must be a reference on a view.

<alignment>

string: one of these alignment settingsleftcenterright.


By using resetLabelAlignment you can reset the value to its default value. The default setting is determined by the view type, but usually is "center".

By using labelAlignmentIsSet you can find out whether the value returned by labelAlignment is a value that has been set with setLabelAlignment (and that has not been restored to the default with a call to resetLabelAlignment).



Related articles