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>
</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">
function OnInit(event)
	local dateText = okUI:FindPanel("panel1"):FindControl("date")
	<object class="okInitScript">
<object class="okPanel" name="panel1">
	<title>Panel with a static text</title>
	<object class="okStaticText" name="date">
</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