8.10.6.5 The (Object Properties) Programming tab

Object Properties Programming tab.png

Name

A text object may be named, enabling Origin to identify the object during execution of built-in or user-defined scripts. Unnamed labels are only affected by scripts entered in the object's Programming Control dialog box (See the Script text box, below). To name a text object, enter a name in the Name text box.

Warning: Some labels -- such as the legend and the axis titles -- are named by Origin. In most cases, you will not want to rename legends and axis titles; doing so will cause menu commands that update the labels to stop working or to create duplicate labels. One reason why you might want to rename the graph legend: You have customized the legend and you want to ensure that your customizations are not overwritten.

The Attach To Group

To control the effect of layer manipulation and axis rescaling on the label's size and position, select one of the following radio buttons:

Page. When attached to the page, the label is both position and scale independent of its layer. The label position and size are not affected by moving or resizing the layer, or by changing the axis scale. The label is still a part of the layer, however, and is deleted if the layer is deleted.

Layer Frame. When attached to the layer frame, the label is position dependent on its layer. When you move the layer, the label moves with the layer. If you resize the layer, the label changes dimensions proportionally and moves with the layer. If you rescale the axes, however, the label does not change size or position.

Layer and Scales. When attached to the layer and scales, the label is connected to the layer in terms of size and position. If you move the layer, the label moves with the layer. If you resize the layer, the label changes dimensions proportionally and moves with the layer. If you rescale the axes, the label size does not change, but the label moves so that it maintains the same XY coordinate value.

The Link to Variables (%,$), Substitution Level Drop-down List

This drop down list is only useful in the Label Control dialog box of a text label. Select options to determine how data or variables will display in the message displayed by the text label. Each time Origin redraws the label, the label is updated to reflect any changes made to the data or variables signified within.

See the screenshots for the longname of workbook which will be referenced by the sample expressions

400

Option Action Example: %(1) Example: %(2)
0 No link Substitude 0.png Substitude 0 2.png
1 Literally appear the substitution in the link Substitude 1.png Substitude 1 2.png
2 Link and resolve only first level Substitude 2.png Substitude 2 2.png
3 Link and resolve up to two levels Substitude 2.png Substitude 3 2.png

To use the drop down list, proper notation conventions must be followed in the associated text label. Basic notation conventions are listed in Linking Text Labels to Data and Variables.

The Mouse Click Group

Select the No Vertical Movement check box to prevent movement of the label in the vertical direction.

When the No Horizontal Movement check box is selected, the label cannot be moved in the horizontal direction.

Select the Not Selectable check box to restrict selection or movement of the label entirely. This option is useful when using a label as a backdrop to a page or layer. When Not Selectable is selected, you cannot use the ALT+double-click shortcut to edit the dialog box. Instead, enter Button Edit Mode (Edit:Button Edit Mode), click on the label, and select Format:Label Control.

The Visible Check Box

When the Visible check box is selected, the label's associated Text Control dialog box, as well as the Label Control dialog box, are accessible by double-clicking on the label (Text Control), or ALT+double-clicking on the label (Label Control). The label can also be moved and resized.

When this check box is cleared, the label is not visible and its associated dialog boxes cannot be accessed by double-clicking (or ALT+double-clicking) on the label.

To display and edit the label, enter Button Edit Mode by selecting Edit:Button Edit Mode. Exit Button Edit Mode after editing the label by re-selecting Edit:Button Edit Mode (When in Button Edit Mode, the Button Edit Mode menu command has a check mark next to it).

The Real-Time Check Box

Select the Real-Time check box to update the label in real-time whenever there is a real-time plotting event.

The Script, Run After Drop-down List

The option selected from this drop-down list defines the circumstances required for script execution. Enter the script to be executed in the associated text box beneath this drop-down list.

Option Script Execution Method
None Do not execute script.
Button Up Execute script when button is clicked.
Moved Execute script when button is moved.
Sized Execute script when button is resized.
Moved or Sized Execute script when button is moved or resized.
Redrawn Execute script when button is redrawn.
Real-Time Execute script when a real-time event occurs. These events are typically generated through DDE data transfer or from a Data Acquisition module.
Window Create Execute script when the button's window first opens.
Window Close Execute script when the button's window closes.
Window Activate Execute script when the button's window becomes active.
Window Deactivate Execute script when the button's window becomes inactive.
New Selection Execute script when unselected button is clicked.
Before Save Execute script immediately before saving the project.
Axes Rescale Execute script when graph axes rescale.
All Events Execute script when any one of the previous events occur.
Mask Change Execute script when masking data change.
Data Change Execute script when data updated.

The (Script) Text Box

To associate a script with an object, type the script directly in this text box or copy and paste it from any text editor. Each LabTalk statement in the script must end with a semicolon. ENTER is a simple carriage return. To add a tab within the text box, use CTRL + TAB.