The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: update/refresh checkbox status in GUI
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 24
Registered: 2/11/11
update/refresh checkbox status in GUI
Posted: Sep 23, 2011 3:30 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have a GUI that contains 3 check boxes among other inputs, and a calculate button that executes the function of my GUI. The GUI displays graphs of data that can be thrown away, or kept on an individual basis, and the kept graphs turned into a histogram if the user desires.
The check boxes are 1. Histogram (makes histogram of data when checked), 2. Duplicate Filter (deletes a graph of data if it is determined to be a duplicate), and 3. Save Histogram (saves the data that went into making the histogram in a .mat file).
The problem I am having is that the code doesn't recognize when I check or uncheck a box after the first time I've run the program. For example, when I am only viewing the data, and do not want to save the histogram, I would check the "Histogram" and "Duplicate Filter" boxes only. The program will run, delete duplicate graphs, and display a histogram at the end. If I then check the "Save Histogram" check box and run again, it will only apply the duplicate filter and histogram at the end, as if it didn't know I changed the status of the check box(s). The same thing happens in the other direction, if "Save Histogram" was checked for the first run, it will ask me to name the histogram's .mat file every time, even after unchecking the box and running the calculation again.
I have looked around for hours, but haven't found anything that addresses this problem except "drawnow('update')", but that didn't work either. How can I make the GUI refresh its internal code to see that a change has occurred in the status of the check boxes?

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.