how to set ActiveX invisible

조회 수: 2 (최근 30일)
Fan Sudi
Fan Sudi 2012년 12월 18일
Hello all,
how to set the ActiveX invisible on figure.
the code :
LEDHandle = actxcontrol( 'MWNUMLED.NumLEDCtrl.1', LEDPos );
  댓글 수: 6
Walter Roberson
Walter Roberson 2012년 12월 18일
possibly
set(LEDHandle, 'Enabled', {'off'})
Fan Sudi
Fan Sudi 2012년 12월 18일
Array must be numeric or logical.
this should be: LEDHandle.Enabled = 0 ; or LEDHandle.Enabled = 1 ;
but it didn't work.

댓글을 달려면 로그인하십시오.

답변 (2개)

Mark Whirdy
Mark Whirdy 2012년 12월 18일
편집: Mark Whirdy 2012년 12월 18일
type
get(LEDHandle)
The link below alludes to an "offcolor" property - does this do anything?
Otherwise if the writer of the object didn't create a visible property/method there's not much can be done, I'd suggest a hokey workaround of creating a gui-panel on top of the object and making it visible/invisible to reveal the object underneath.
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 12월 18일
I suspect offcolor refers to it being a LED indicator emulator, with one color for "on" and another color for "off". If there is any kind of frame around the indicator, setting offcolor to the surrounding color would leave the frame visible.

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2012년 12월 18일
Perhaps a MATLAB uicontrol('Style', 'radio') or 'checkbox' would meet your needs? You can set the CData property to draw any rectangular shape where the object would go, and that CData will not change with the Value of the control, so when it was time to change the color of the "LED" you would change its CData.

카테고리

Help CenterFile Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by