Consultor Eletrônico



Kbase P130562: How to enable or disable an OCX control
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/16/2008
Status: Unverified

GOAL:

How to enable a control frame widget

GOAL:

How to disable an OCX control

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
Windows

FIX:

Keep in mind that when using an OCX control in an ABL session there are 3 objects involved:

- The ABL CONTROL-FRAME widget. AppBuilder generated code provides a widget-handle to this, called CtrlFrame (by default)
- The control-frame COM control. AppBuilder generated code provides a com-handle to this, called chCtrlFrame (by default)
- The actual OCX control. AppBuilder generated code does not provide a com-handle to this by default.

Typically the enabled or disabled state of the OCX control is set on the control itself using the appropriate methods or properties. However there are exceptions to this:

ABL statements such as DISABLE ALL can disable the ABL CONTROL-FRAME, and in some cases it may be desirable to disable the control at this level (for example because the control itself doesn't have a way to explicitly enable or disable it).

To achieve this, set the SENSITIVE attribute on the WIDGET-HANDLE for the ABL CONTROL-FRAME widget.
Assuming AppBuilder generated defaults are used, the reference for this will be:

CtrlFrame:SENSITIVE = <TRUE/FALSE>.