Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: GUI interconnect toggle buttons

Subject: GUI interconnect toggle buttons

From: Daphne

Date: 25 Dec, 2007 20:51:08

Message: 1 of 4


I am building a complex GUI to control a microscope system
with several functions. The plan is to use toggle buttons
to choose, for example, different objective lenses. How
can I "connect" a few buttons so that only one of them may
be active at a time?

A smaller, related issue, how can I change the appearance
or color of the pressed button so that it is very clear
which one is activated? The default change is not dramatic
enough and needs to be very clear...

Thanks,
Daphne

Subject: GUI interconnect toggle buttons

From: Stephan Hoffmann

Date: 25 Dec, 2007 22:00:23

Message: 2 of 4

"Daphne " <daphnew_too_nospam@yahoo.com> wrote in message
<fkrqfs$oqt$1@fred.mathworks.com>...
>
> I am building a complex GUI to control a microscope system
> with several functions. The plan is to use toggle buttons
> to choose, for example, different objective lenses. How
> can I "connect" a few buttons so that only one of them may
> be active at a time?
>
> A smaller, related issue, how can I change the appearance
> or color of the pressed button so that it is very clear
> which one is activated? The default change is not dramatic
> enough and needs to be very clear...
>
> Thanks,
> Daphne


You could do it manually. You can set the toggle status of
each button by set(handles.TAG,'Value',1) or
set(handles.TAG,'Value',0).
With set(handles.TAG,'BackgroundColor',[r g b]) you are able
to change the color of a button.


Regards,
Stephan Hoffmann

Subject: GUI interconnect toggle buttons

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 26 Dec, 2007 00:27:10

Message: 3 of 4

In article <fkrqfs$oqt$1@fred.mathworks.com>,
Daphne <daphnew_too_nospam@yahoo.com> wrote:

>I am building a complex GUI to control a microscope system
>with several functions. The plan is to use toggle buttons
>to choose, for example, different objective lenses. How
>can I "connect" a few buttons so that only one of them may
>be active at a time?

uibuttongroup()
--
  "Is there any thing whereof it may be said, See, this is new? It hath
  been already of old time, which was before us." -- Ecclesiastes

Subject: GUI interconnect toggle buttons

From: turtie

Date: 26 Dec, 2007 08:12:33

Message: 4 of 4

Try this tutorial. It covers what you want to do.

http://www.blinkdagger.com/matlab/matlab-gui-tutorial-buttons-button-group

Good luck!

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
gui Daphne 25 Dec, 2007 15:55:05
toggle button Daphne 25 Dec, 2007 15:55:05
uipanel Daphne 25 Dec, 2007 15:55:05
property inspector Daphne 25 Dec, 2007 15:55:05
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics