Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Linking a Slider to Edit Box
Date: Mon, 3 Sep 2007 21:38:24 +0000 (UTC)
Organization: Ohio State University
Lines: 40
Message-ID: <fbhusg$f5f$1@fred.mathworks.com>
References: <fbhk1s$jq7$1@fred.mathworks.com> <fbhkhv$rtg$1@fred.mathworks.com> <fbhmt4$86u$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1188855504 15535 172.30.248.38 (3 Sep 2007 21:38:24 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 3 Sep 2007 21:38:24 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 784014
Xref: news.mathworks.com comp.soft-sys.matlab:426815



"Phil Goh" <pgnator@googlemail.com> wrote in message 
<fbhmt4$86u$1@fred.mathworks.com>...
> "Jerome Briot" <dutmatlab@yahoo.fr> wrote in message <fbhkhv$rtg
> $1@fred.mathworks.com>...
> > Hi,
> > 
> > use sliderPanel from the FEX :
> > 
> > http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?
> objectId=13845&objectType=file
> > 
> > Jérôme
> 
> 
> Hi, thanks for that component. But that's not what I'm looking for. I'm a 
novice 
> to the whole GUI thing and was looking for a way to do it programmatically 
and 
> not resort to using someone else's component. The reason I want to do this 
is to 
> get a feel for the GUI API in Matlab.
> 
> Thanks
> Phil

What about something like this:

(in the edit callback)
textValue = str2num( get(editHandle,'String') )
set(sliderHandle,'Value',textValue)

(in the slider callback)
sliderValue = num2str( get(sliderHandle,'Value') )
set(editHandle,'String', sliderValue)

Is that what you're looking for?
Lorenzo