From: Philip on 13 May 2010 18:00 I have a reset button in my gui. Currently, I have all the code in my openingfcn within the reset buttons functions. Is there a way to just call the openingfcn? Thanks, Phil
From: Walter Roberson on 13 May 2010 18:17 Philip wrote: > I have a reset button in my gui. Currently, I have all the code in my > openingfcn within the reset buttons functions. Is there a way to just > call the openingfcn? Yes, it is allowed to use the same callback for two purposes, and it is also allowed to have one callback call the routine associated with another callback.
From: Philip on 13 May 2010 19:24 Thanks, Walter. How do I do this?
From: Walter Roberson on 13 May 2010 19:45 Philip wrote: > Thanks, Walter. > > How do I do this? resethandle = uicontrol('Style','pushbutton', 'Position',AppropriatePositionHere, 'Callback', {@openingfcn}); Or, alternately, if you have code before the openingfcn should be invoked, (such as if you confirm with the user that they really want to reset before you do it), then in your callback for the push button, just call openingfcn, probably passing it the same parameters that the pushbutton was given: openingfcn(hObject, eventstructure, handles); %sample call
From: Philip on 13 May 2010 20:20 Walter Roberson <roberson(a)hushmail.com> wrote in message <hsi2v9$gnl$1(a)canopus.cc.umanitoba.ca>... > Philip wrote: > > Thanks, Walter. > > > > How do I do this? > > resethandle = uicontrol('Style','pushbutton', > 'Position',AppropriatePositionHere, 'Callback', {@openingfcn}); > > Or, alternately, if you have code before the openingfcn should be invoked, > (such as if you confirm with the user that they really want to reset before > you do it), then in your callback for the push button, just call openingfcn, > probably passing it the same parameters that the pushbutton was given: > > openingfcn(hObject, eventstructure, handles); %sample call Sorry, I am still pretty new to matlab. So resethandle is my buttons handle? also, what is position referring to? And lastly, I place that within my reset button's function. right?
|
Next
|
Last
Pages: 1 2 Prev: Spectral Flatness Measure (SFM) Next: Help plotting and graphing yield strees vs strain rate |