how to set ActiveX invisible

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 日
Guessing here: possibly
set(LEDHandle, 'Visible', 'off')
Fan Sudi
Fan Sudi 2012 年 12 月 18 日
Error using COM.MWNUMLED_NumLEDCtrl_1/set Invoke Error: Unknown name or named argument
Error in Generate_FigureContent (line 173) set( LEDHandle,'Visible', 'off' ) ;
Walter Roberson
Walter Roberson 2012 年 12 月 18 日
What are displayed for the following:
set(LEDHandle)
methods(LEDHandle)
Fan Sudi
Fan Sudi 2012 年 12 月 18 日
K>> a = set(LEDHandle)
a =
Digits: {}
Decimals: {}
BackColor: {}
BackPicture: {}
BevelInner: {3x1 cell}
BevelOuter: {3x1 cell}
OnColor: {}
OffColor: {}
Value: {}
BevelWidth: {}
BorderWidth: {}
LeadingZeros: {}
SpacingHorizontal: {}
SpacingVertical: {}
FixedDecimal: {}
ItalicsOffset: {}
SegmentWidth: {}
SegmentSeparation: {}
LeadingOneDigit: {}
DisplayMode: {2x1 cell}
DecimalSize: {}
DecimalPosition: {}
LeadingPlusMinus: {}
AlphaNumeric: {}
Outline: {}
OutlineAlign: {3x1 cell}
OutlineColor: {}
OutlineTitle: {}
OutlineWidth: {}
SingleBuffer: {}
FocusOutline: {}
hWnd: {}
Enabled: {}
Configuration: {}
AutoRedraw: {}
K>> a.DisplayMode
ans =
'Numeric'
'Alpha_Numeric'
K>> b = methods(LEDHandle)
b =
'AboutBox'
'Redraw'
'RedrawStatic'
'ShowPropertyPage'
'addproperty'
'constructorargs'
'delete'
'deleteproperty'
'events'
'get'
'interfaces'
'invoke'
'load'
'move'
'propedit'
'release'
'save'
'send'
'set'
serial days ago, I deleted it but didn't display again.Now ,there's no Property to hide the LEDHandle.Moved it outside of the screen,but didn't move back.
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 日

0 投票

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 日

0 投票

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.

質問済み:

2012 年 12 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by