How to display a message in GUI when a button is clicked?
11 vues (au cours des 30 derniers jours)
chlor thanks le 27 Juil 2016
I have a "load" pushbutton in GUI and since I have a lot of data, it usually takes about several minutes for it to load, and I would like my GUI to display a message saying "loading" until the data is loaded. (The message will be gone once the loading the complete) So my user won't be wondering why the GUI has not worked and close the GUI...
What should I look into to achieve this? Does anyone have an example of a similar situation? Thank you!
Image Analyst le 27 Juil 2016
Modifié(e) : Image Analyst le 27 Juil 2016
At the end of your OpeningFcn function put a drawnow after you set the statis text label.
handles.test1.String = 'Please wait...Loading data...';
Hopefully that will show your GUI on screen. Your OutputFcn function runs after your OpeningFcn, so put all your data loading operations into that function.
s = load(yourDataFile); % Load your data somehow.
handles.test1.String = 'Done loading data...Ready for you to use!';