Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

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

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

Topic: Matlab GUI with timer in the background
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Nima Nikvand

Posts: 11
Registered: 12/30/12
Matlab GUI with timer in the background
Posted: Jan 6, 2013 12:17 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello everyone,

I have a GUI (developed using guide) and I need to show the current time and date in one of its corners, I have written a simple code which works alright, however I am not sure where in the GUI code to use it. When I use the code in GUI_OpeningFcn, which executes just before gui is made visible, it shows the time but MATLAB remains busy and I won't be able to run anything else from the command window, furthermore, I am not sure how to stop the timer and delete the timer when the GUI is closed. When I use handles to save timer created in OpeningFcn and later delete the timer in OutputFcn, I get an error saying my handle is invalid! The code is posted below and I appreciate any help with this.



function timexup(obj,event,handles)
set(handles.text6,'Fontsize', 10, 'FontWeight', 'bold');

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

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.