Drawing a circle on top of an ActiveX control

2 views (last 30 days)
Hi,
I am using an ActiveX control made by IDS to view the output of a microscope camera called the 'uEye'. This allows me to see the video stream from the microscope camera. I have made a GUI using GUIDE and everything is working okay.
As an additional feature, I would like to draw a circle on top of the ActiveX control so that I can keep track of where my laser is pointing in the microscope. I have tried using the 'annotation(ellipse)' function in Matlab, but it always draws the circle behind the ActiveX control.
Does anyone know a way to force the ActiveX control to be in the background, and the circle in the foreground?

Accepted Answer

Kevin
Kevin on 21 Apr 2015
Trying 'uistack' did not solve my problem. This is because the ActiveX control cannot be manipulated with 'uistack'. Only 'uicontrol' elements can.
However, I was able to place a button on top of the ActiveX control that serves the purpose of marking my laser spot by creating the button after the ActiveX control in the 'OpeningFcn'. Due to the draw order of components that have the same parent, the ActiveX control is drawn first, then the button on top. The key is making the GUI the parent of both the ActiveX control and button.
Thanks, Kevin
  1 Comment
Tudith langer
Tudith langer on 19 Jan 2017
Dear Kevin, this method for placing a button on top of the activex control seems to be working but how do I implement this if I have to bring an axes on top of an activex control and not a button. Thanks Tudith

Sign in to comment.

More Answers (1)

Geoff Hayes
Geoff Hayes on 19 Apr 2015
Kevin - try using uistack which may be able to use to push your ActiveX control to the bottom of the visual stacking order (or bring the circle to the top).

Community Treasure Hunt

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

Start Hunting!