Thread Subject: guide: initialize values of sliders

Subject: guide: initialize values of sliders

From: Kai

Date: 8 Jan, 2009 11:19:11

Message: 1 of 3

Hello,

I'm using guide to create a MATLAB gui. at witch position in the
corresponding .m-file can I define the initial values of my objects?

code-flow in my file is like:

function varargout = gui(varargin)

function gui_OpeningFcn(hObject, eventdata, handles, varargin)

function varargout = gui_OutputFcn(hObject, eventdata, handles)

function slider1_Callback(...)

Thanks for help,
Kai

Subject: guide: initialize values of sliders

From: Jiro Doke

Date: 8 Jan, 2009 12:54:02

Message: 2 of 3

Kai <invalid@invalid.invalid> wrote in message <6sm5pfF73d9fU1@mid.dfncis.de>...
> Hello,
>
> I'm using guide to create a MATLAB gui. at witch position in the
> corresponding .m-file can I define the initial values of my objects?
>
> code-flow in my file is like:
>
> function varargout = gui(varargin)
>
> function gui_OpeningFcn(hObject, eventdata, handles, varargin)
>
> function varargout = gui_OutputFcn(hObject, eventdata, handles)
>
> function slider1_Callback(...)
>
> Thanks for help,
> Kai

Kai,

Either set it in the .fig file (via the Property Inspector of the component) or use the CreateFcn of the component.

jiro

Subject: guide: initialize values of sliders

From: Kai

Date: 8 Jan, 2009 13:07:48

Message: 3 of 3

Jiro Doke wrote:

> Kai <invalid@invalid.invalid> wrote in message
> <6sm5pfF73d9fU1@mid.dfncis.de>...
>> Hello,
>>
>> I'm using guide to create a MATLAB gui. at witch position in the
>> corresponding .m-file can I define the initial values of my objects?
>>
>> code-flow in my file is like:
>>
>> function varargout = gui(varargin)
>>
>> function gui_OpeningFcn(hObject, eventdata, handles, varargin)
>>
>> function varargout = gui_OutputFcn(hObject, eventdata, handles)
>>
>> function slider1_Callback(...)
>>
>> Thanks for help,
>> Kai
>
> Kai,
>
> Either set it in the .fig file (via the Property Inspector of the
> component) or use the CreateFcn of the component.
>
> jiro

CreateFcn is the one I was looking for. thanks!

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
guide Jiro Doke 8 Jan, 2009 07:55:06
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com