Roy Schestowitz wrote:
> MKA wrote:
>> Roy Schestowitz wrote:
>>> MKA wrote:
>>>> Any suggestions for using the timer function to display
>>>> clock in a static text or an edit text object using
>>>> Thanks in advance.
>>> That's quite simple. All you need to do is set the label or
>>> editable text
>>> box to the value returned by the timer function.
>>> Instead of re-implementing, try using what has been done:
>>> Roy Schestowitz
>> Thanks Roy for your help
>> I am trying to make it simple, but I am afraid it is not
>> I open Guide, insert a static text
>> For the opening function I use
>> % UIWAIT makes bclock wait for user response (see UIRESUME)
>> % uiwait(handles.figure1);
>> Then I add the next two functions at the end
>> function =TimerFcn(varargin)
>> % Display Clock
>> function =closerequestfcn(varargin)
>> % Shut off the timer and close the figure when the x is clicked
>> After the first timer event it opens a new figure (also called
>> figure1 like the GUI figure. Now it does not find the text1
>> and stops to work.
>> Can you see where my logic faults.
> Without GUIDE and the running demo, I'm afraid that I find it
> difficult to
> debug or even follow. It seems possible to me that you
> things. You need a single callback to be executed every 1 second;
> you set the clock. The rest of the code is detail which
> overcomplicates the
> problem to a reader. Try to divide it into logical blocks and
> separate out
> the cause of the error. It would simplify things.
> Roy Schestowitz
Solution is very simple - from matlab command line just start 'GUIDE
<myapp>' and right click on blank area -> GUI options ->
command line accessibility -> & set other (use settings ...). Then
launch object browser and double-click on figure (now you have
figure's properties). Last, find 'HandleVisibility' and set it to
'On' ! Do that for axes also, and you have all things done.