Add Position Property to mwsamp Control

This example shows how to add a custom property, Position to the mwsamp control.

Create the control.

h = actxcontrol('mwsamp.mwsampctrl.2', [200 120 200 200]);

Create the property.

addproperty(h,'Position')

Initialize the values.

h.Position = [200 120];

List the properties of the control.

get(h)
            Label: 'Label'
           Radius: 20
    Ret_IDispatch: [1x1 Interface.mwsamp2_ActiveX_Control_module._DMwsamp2]
         Position: [200 120]

Property Position has been added.

Related Topics