The Common Widgets Extended Widgets framework can be used to wrapper an OleControl so it can be used in a more familiar way. That is, Smalltalk accesssors are used to wrap the OleControl property messages (propertyAt: and propertyAt:put:) and invoke message (invoke:withArguments:), and the Common Widgets callback style is used for all the OLE events of interest.
For a reference on building Extended Widgets, see the Extended Widgets. The main approach is to:
createPrimaryWidget: theName parent: parent argBlock: argBlock
"Private - Create and answer the basic widget that is the root
of the widget hierarchy for the receiver's widget system."
^self parent
createOleControl: 'the control'
argBlock: [:w | w
clientName: 'TRACKBAR.TrackbarCtrl.1';
ambientPropertyReceiver: self;
ambientPropertySelector: #dispidAmbientPropertyAt:].
initializeAfterCreate
"Private - Perform any widget-specific post-create initialization."
super initializeAfterCreate.
self primaryWidget
addOleEventHandler: 'Change'
receiver: self
selector: #callValueChangedCallback
clearSelection
"Clears the slider's selection range."
^self primaryWidget
invoke: 'ClearSelection'
withArguments: #()
lineSize: resourceValue
"Set the value of the XmNlineSize resource.
Resource type: Integer
Default setting: 10
Resource access: CSG
Description: Specifies the line size. This is the amount
that the slider moves when receiving a key press."
self primaryWidget propertyAt: 'LineSize' put: resourceValue
lineSize
"Answer the value of the XmNlineSize resource.
Resource type: Integer
Default setting: 10
Resource access: CSG
Description: Specifies the line size. This is the amount
that the slider moves when receiving a key press."
self primaryWidget propertyAt: 'LineSize'