Kbase P175540: CodeJock CommandBars OCX interferes with window resize triggers
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/18/2010 |
|
Status: Unverified
SYMPTOM(s):
CodeJock CommandBars OCX interferes with window resize triggers
Resizing a window containing CodeJock CommandBars OCX
WINDOW-RESIZED trigger to defined for the window
The WINDOW-RESIZED trigger fires for every pixel that the window is resized.
FACT(s) (Environment):
Expected behavior is that the WINDOW-RESIZED trigger only fires when the mouse button is released at the end of the resizing operation
OpenEdge 10.x
Windows
CAUSE:
The CommandBars control itself generates the Windows-level messages that mapped to the ABL WINDOW-RESIZED event.
The number of events it sends is dependent on it's OPTIONS:UpdatePeriod property; this determines the interval at which the control sends events. The default value is 100 (ms) so it will send an event every 10th of a second.
FIX:
There are two possible fixes for this issue:
1. It?s possible to control the frequency with which the controls sends these events by setting the UpdatePeriod on the control. This property determines how long the CommandBars control waits in between sending events. It defaults to 100 ms, increasing the value will reduce the number of events. For example, if in the code in the you add the line "chCtrlFrame:CommandBars:OPTIONS:UpdatePeriod = 1000." , it will send at most 1 event per second.
2. It?s possible to discard the excess events in the ABL code. For this, you would need to add the line "IF LAST-EVENT:FUNCTION = "CONTAINER-EVENT" THEN PROCESS EVENTS." At the start of the window-resized trigger.