Why do certain ActiveX control objects disappear after changing graphic properties of other objects in the same MATLAB figure window?

Why do certain ActiveX control objects disappear after changing graphic properties of other objects in the same MATLAB figure window?
I have embedded a Microsoft ActiveX Calendar control in a figure. I also have button controls, static text controls, and edit text controls in the figure. The command that I am using to create the ActiveX control is:
calendar = actxcontrol ('MSCAL.Calendar.7', [100 150 350 250], fig, 'event');
The callback for one of the buttons changes the BackgroundColor of one of the edit text controls. The month and year drop down boxes on the calendar control 'disappear' after this callback is executed. The drop down boxes reappear if I switch to another window that covers up the calendar and then switch back to the figure with the calendar.
It appears to be a drawing problem. I tried the REFRESH command, but that causes the drop down boxes to disappear. I have also tried the DRAWNOW command, but the same thing happens. The only way that I have been able to make the drop down boxes reappear without covering the figure up with another window is to set the figure's Visible property to 'off' and then to 'on'.

 Accepted Answer

This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This is a bug in MATLAB 6.5 (R13) occurring when changing a property of the figure or one of the figure's children. Our development staff is currently investigating this issue.
Currently, to avoid having the MSCalendar ActiveX control drop down boxes disappear, run the following function that "shakes" the ActiveX control after changing a property of the figure or its children:
function shakeactx(h)
b = move(h);
b = b+1;
move(h, b);
b = b-1;
move(h, b);

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!