The example is a fill-in field whose value increases by 1 every two seconds. It uses the OCX.Tick event and the Interval attribute of the PSTimer OCX.
Steps to perform:
1) Start an AppBuilder session.
2) Create a new window (regular or Smart Window).
3) Add an integer fill-in field to the window. Its default name is FILL-IN-1.
4) Add the PSTimer OCX object. The PSTimer icon in the object palette is a stopwatch.
5) Create an OCX.Tick event for the PSTimer with the following code:
(Use the New button to create events not listed in the event combo-box.)
FILL-IN-1 = FILL-IN-1 + 1.
DISPLAY FILL-IN-1 WITH FRAME {&FRAME-NAME}.6) Add a button widget to the window.
7) Create a CHOOSE trigger for the button with the following code:
chCtrlFrame:PSTimer:Interval = 2000.