Release 10.1A: OpenEdge Development:
Programming Interfaces

> ## Setting the control-frame name

> When you first insert an ActiveX control into the design window, the AppBuilder creates a unique default Object name for the control-frame that contains the ActiveX control. As with any 4GL widget, you can change this Object name in the AppBuilder. However, you must use extra care when changing this name. The AppBuilder uses the control-frame Object name for three program elements:

> - As the value for the control-frame widget `NAME` attribute (and COM object Name property). When loading the associated ActiveX control at runtime, the AppBuilder locates the control instance in the section of the`.wrx` file identified by this name. When responding to ActiveX control events, Progress uses this name to identify event handlers for the control.

> - As the variable name for the widget handle of the control-frame widget.

> - As a part of the variable name (prefixed by “ch”) for the component handle of the control-frame COM object.

> When you change the control-frame Object name manually in the AppBuilder, the AppBuilder automatically updates these three program elements and all AppBuilder-generated code. When you save the application file, aside from saving the changes to these program elements, it also updates the corresponding section name in the `.wrx` file.

> However when you change this Object name, the AppBuilder does not update any custom code you have added using the Section Editor. It also does not update the identity of any event handlers that you might have defined for the control in external procedures other than the one where you initially defined the control. You must update this code manually in the Section Editor or external procedure file. (For more information on how Progress identifies event handlers for ActiveX controls, see the "Handling events" section.)

> Note: Progress Software Corporation does not recommend changing the control-frame name at runtime. If you do, the event handlers for the control will not work, since an event handler name is formed in part from the name of the control-frame and the control.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095