Roclockwidget – BrightSign Object Reference Manual (FW 5.1) User Manual
Page 68

60
roClockWidget
This object places a clock on the screen. It has no extra interface, only construction arguments.
Interfaces:
ifTextWidget
Object creation: The roClockWidget object is created with several parameters.
CreateObject("roClockWidget", rect As roRectangle, res As roResourceManager, display_type
As Integer)
•
rect: The rectangle in which the clock is displayed. The widget picks a font based on the size of the rectangle.
•
res: A resources.txt file that allows localization via the
object (see below for further details).
•
display_type: Use 0 for date only, and 1 for clock only. To show both on the screen, you need to create two
widgets.
Example:
rect=CreateObject("roRectangle", 0, 0, 300, 60)
res=CreateObject("roResourceManager", "resources.txt")
c=CreateObject("roClockWidget", rect, res, 1)
c.Show()
The resource manager is passed into the widget, which uses the following resources within "resources.txt" to display the
time and date correctly. Here are the "eng" entries:
[CLOCK_DATE_FORMAT]
eng "%A, %B %e, %Y"
[CLOCK_TIME_FORMAT]
eng "%l:%M"