How do I change the position or properties of ActiveX controls programmatically in MATLAB 7.0.1 (R14SP1)?

6 views (last 30 days)
I cannot change the properties of an ActiveX control programatically at run time in MATLAB. Specifically, I place an ActiveX control on my MATLAB GUI using the following syntax:
pos = [100 120 350 200];
h = actxcontrol('<progid>',pos,hObject)
I can place an ActiveX control on a figure at location [100 120] with width 350 and height 200. Alternatively, I can use GUIDE to embed an ActiveX control on a GUI. Once the control is on the figure (or I run the GUI), however, its position and other properties are not exposed, so I have no way of changing them.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The ability to access the properties of an Active X control is not available in MATLAB.
You can, however, change the "position" property of an ActiveX control by using the MOVE function. In the given example, the following command moves the ActiveX control to the new position and resizes it:
h.move([10 10 200 200])
There are no workarounds for changing other properties of an ActiveX control.

More Answers (0)

Products


Release

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!