Date: Sep 23, 2011 3:30 AM Author: Alex Subject: update/refresh checkbox status in GUI 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?