Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toggle Buttons

Status
Not open for further replies.

Tacomagic

Bioengineer
Joined
Jul 10, 2006
Messages
2
Location
US
Hey there,

I'm trying to create a data collecting GUI in Matlab. I'm fairly new to constructing GUIs in matlab so I need a little help here. I want to create a toggle button that collects data when pressed, and stops collecting data when it is unpressed. However, when pressed the program continuously collects data, and unpressing it does not stop the data collection.

Basically I'm trying to find a way to poll the state of the button within callback for the initial button down. So far I've had no luck as the get(hObject,'value') is unfortunately not updated until after the callback is finished executing.

Any help here is appreciated.
 
Never mind figured it out. Felt really dumb when I realized all I needed was the drawnow command. Sigh.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top