|
| |
The label object is a control generally used for labeling
areas and for displaying information which the user cannot interact with.
Simply drag and drop an oLabel object onto the plot background
and configure.

This example shows 2 labels have been added. The top
label has been configured for:
 | A red background (12 - Drag and drop color from Col/Val
tab), a yellow text color (14) |
 | A border showing (1). |
 | A more interesting font has been selected. |
 | A text tip of 'Click for time' (shown on image). |
 | An update value of (RTIME) or real time. |
 | Event code of !POBJ UPdate. |
When the label is clicked, the event code will be ran updating
plot objects. The value of the label will be changed to its update value
of the real system time. Note: !POBJ Update is typically in a more useful
location, such as one of the object timers to update at periodic intervals.
A second label is shown with no modifications (obj2).
Note that the background by default is transparent and no border is shown.
Text in a label box is centered unless its height is 10 or more.
The text string will wrap if the height is sufficient. A
carriage may be inserted in a text line by using \n.

The object code generated for the above example by the Macro
Builder is as follows:
' Obj1 -- OLABEL *****
!POBJ oLabel.Obj1=30.,95.,11.,3.,My label,12,14,8,1
!POBJ Obj1.U=(RTIME)
!POBJ Obj1.tip=Click for time
!POBJ Obj1.F=Lucida Handwriting,8,0,0
'-- Event Code
!POBJ Obj1.C=!POBJ Update
' Obj2 -- OLABEL *****
!POBJ oLabel.Obj2=29.,90.,10.,3.,Obj2,,0,9,0
!POBJ Obj2.tip=This is a label example showing time
' Obj3 -- OLABEL *****
!POBJ oLabel.Obj3=30.,86.,10.,10.,this\nis a\ntest,,0,9,1
The .Set function for a label may be used to change it's
value.
!POBJ obj1.Set=Hello!
or
!POBJ obj1=Hello!
The text for a label should not contain commas since they
denote data for color.
The value of a label may be read by treating it as a macro
value.
!STAT (obj1)

 | Creating:
!POBJ oLabel,objName=L,T [,W,H,text,back color,text color,font
size,border=1]
!POBJ oLabel.Label1=30,70
!POBJ oLabel.Label2=30,60,30,5,Hello. How are you? I am fine,14,0,8,1
Use NO Commas in the text.
|
 | Functions:
SET Value (.Set or omitted)
Sets the value of the object.
objName.Set=[text,back color, font color, font size]
!POBJ Label1.Set=Change!
!POBJ Label2=Bye!,14,12,10
Use no commas in the text.
Clear (.Clear or Clr)
Clears the value
!POBJ objName.Clr
!POBJ Label1.Clr
Text Tip (.Tip)
Sets the text pop-up tip
!POBJ objName.Tip=Text string
!POBJ label1.Tip=This is a tip!
Font (.Font or .F)
Sets the font of the object
!POBJ objName.F=[Font name,size,italic (0/1),bold (0/1)]
Move (.Move or .M)
Moves the object to new coordinates/changes sizing
!POBJ objName.M=[L,T,W,H] or !POBJ objName.M=[L,T,W,H]
!POBJ label1.M=50,50,,10
|
 | Update Value (.Update or .U)
Sets the value which will be used to update the object whenever a !POBJ
Update is performed.
!POBJ obj.Name.U=[text,back color, font color, font size]
!POBJ Label1.U=(RTIME)
|
 | Code Event - (.C or .Code)
Activated by a click.
objName.Code=string of code.
!POBJ Label1.C=!STAT The time is (RTIME)
|
 | Values
(objName) - Value of label text.
(objName.T) - Top coordinate
(objName.L) - Left coordinate
(objName.W) - Width
(objName.H) - Height
(objName.B) - Bottom coordinate
(objName.R) - Right coordinate
(objName.BC) - Background Color
(objName.FC) - Text or foreground color
(ME) - Used only in its event code, returns object name.
((ME)) - Used only in its event code, returns object value.
|
 | Special: A \n may be used to insert a
carriage return in the text. A background color of 7 (light gray) will cause
the background to be transparent so it may be placed over another object.
Text will be centered unless the height is 10 or greater. |
|