Skip to end of metadata
Go to start of metadata

Be aware that you are modifying the model when using this method. Please create a safety copy of your model before you start using it.

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, setLabelAlignment allows you to change the alignment:

<object>.setLabelAlignment( <alignment> )


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.


string: one of these alignment settings: leftcenterright.

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