Kbase 19064: ACTIVEX - How To Program The Progress PSTtimer OCX?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  02/08/2007 |
|
Status: Verified
GOAL:
How to Program the Progress PSTimer OCX?
GOAL:
How to add code for the PSTimer OCX's 'Tick' event?
FACT(s) (Environment):
Progress 9.x
Progress 8.x
OpenEdge 10.x
Windows
FIX:
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.
Step by Step details:
1) Start a UIB 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.