Wrapping OLE controls
When you load the OLE Support feature, a new menu option is added to the Parts menu of the Organizer: the Generate > OLE Wrapper option.
To wrapper the progress bar control, create an application such as OcxProgressBarApp and select the Generate > OLE Wrapper option. In the OLE Class Generator window, do the following:
1. Under OLE object information, select the Controls radio button.
Note:
If you select the Other radio button instead of the Controls radio button, you can generate an automation object. Using an automation object, you can access the methods of a wrapped part. You connect the automationObject attribute of the wrapped part to the automationObject attribute of an OLE Client. For this example, do not generate an automation object.
2. From the drop-down list, select ESPROGRESSBAR.ProgressBarCtrl.1.
Tip icon
If you have registered the control but it is not shown in the drop-down list, complete the following steps:
1. Close the OLE Class Generator window.
2. Evaluate AbtEditOleApp flushCaches. This refreshes the VA Smalltalk cache of control names.
3. Reopen the OLE Class Generator window and continue with this example.
3. Under Code generation options, select View and type a part name such as ProgressBarControl in the combo box. Ensure that all generation options are selected.
4. Under Code generation items, select Properties, press mouse button 2 on the table to pop up its menu, and select Include all. Next, select Methods and, again, pop up the table's menu and select Include all.
5. Select the Generate push button.
After VA Smalltalk generates the wrapper, select Close. The wrapper contains Smalltalk code that can invoke the control's properties and methods.
Note that wrapping a control isn't necessary to use the control in an application. You can register an OLE control and then use it for an OLE Control part as described in Using controls in applications. However, wrapping allows several VA Smalltalk applications to use the control.
Last modified date: 05/15/2020