This is a simple control to display static text within a panel.

positionPOSITIONPosition of the top left corner.
sizeSIZESize in pixels.
labelTEXTLabel text.

XML Example

<object class="okStaticText"> <label>Static Text</label> <position>90,25</position> <size>60,20</size> </object>
Code language: HTML, XML (xml)
<object class="okStaticText"><label>Static Text</label><position>90,25</position><size>60,20</size></object>
Code language: HTML, XML (xml)

Lua Scripting

This component can be updated from the scripts using its SetLabel() method, common to all controls. In order to use it, the component must be given a name, to allow finding it using FindControl() later. For example, here is how to show today’s date in a panel:


<object class="okProfile"> <object class="okScriptCode"> <![CDATA[ function OnInit(event) local dateText = okUI:FindPanel("panel1"):FindControl("date") dateText:SetLabel(os.date("%Y-%m-%d")) end ]]> </object> <object class="okInitScript"> <functionname>OnInit</functionname> </object> </object> <object class="okPanel" name="panel1"> <title>Panel with a static text</title> <object class="okStaticText" name="date"> <position>15,15</position> </object> ... </object>
Code language: HTML, XML (xml)

All XML components that support Lua scripting also inherit from the Control class. Please refer to the FrontPanel Scripting documentation for more information on this class.

Example Screenshot