Boolean Indicator for GUI

What should I use as a simple boolean indicator (e.g., LED) for a GUI? I don't want any kind of button that can be clicked to change its indicator status? The indicator will be turned ON or OFF by the program, not the user. Thanks!

回答 (4 件)

Sean de Wolski
Sean de Wolski 2012 年 7 月 17 日
編集済み: Sean de Wolski 2012 年 7 月 18 日

0 投票

How about a checkbox?
More
This would probably be a fairly simple class to write: an axes on a uipanel with the positioning properties etc. set from the uipanel end of things and the color set from the axes end. It would then basically be a custom uicontrol you could do whatever with.

3 件のコメント

Kevin Ulmer
Kevin Ulmer 2012 年 7 月 17 日
But wouldn't the user be able to "check" the box too?
Walter Roberson
Walter Roberson 2012 年 7 月 17 日
set it's Hittest property to be off :)
Sean de Wolski
Sean de Wolski 2012 年 7 月 18 日
Not if it is disabled

サインインしてコメントする。

Jan
Jan 2012 年 7 月 17 日

0 投票

Or a text as "On" and "Off"?
What about a small picture of a LED which is on or off?

1 件のコメント

Kevin Ulmer
Kevin Ulmer 2012 年 7 月 17 日
I was hoping there might be something equivalent to an "indicator" (as opposed to a "control" on a LabVIEW front panel, but these might work. Thanks!

サインインしてコメントする。

Walter Roberson
Walter Roberson 2012 年 7 月 17 日

0 投票

Possibly a pushbutton or radiobutton with its Enable set to 'disable' (not 'off') ? You could get fancy and set the Cdata property to different images for the two states (only works for pushbutton and radiobutton)
Image Analyst
Image Analyst 2012 年 7 月 17 日

0 投票

You can pick any OCX that you have. If you have Microsoft Visual Studio installed, you have lots of them. You can use any ActiveX control on your GUI.
Or you can simply use an axes to display an image to indicate the two states. I have one that I use for pass/fail calibration indications that is a traffic light. Either green light for passing calibration and they can proceed, or red light meaning it did not pass calibration.

3 件のコメント

Kevin Ulmer
Kevin Ulmer 2012 年 7 月 17 日
Sounds like there are a number of "work arounds", but nothing as simple as adding a button. Thanks!
Sean de Wolski
Sean de Wolski 2012 年 7 月 18 日
@IA: No yellow for "flooring the accerator to pass"?
Image Analyst
Image Analyst 2012 年 7 月 18 日
No, but I do have a check for "isdeployed" that lets it "pass" calibration even if it failed, for someone like me who doesn't have the actual instrument I'm programming for attached to my computer.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

タグ

質問済み:

2012 年 7 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by