<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155568</link>
    <title>MATLAB Central Newsreader - Linking a Slider to Edit Box</title>
    <description>Feed for thread: Linking a Slider to Edit Box</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Mon, 03 Sep 2007 18:33:32 -0400</pubDate>
      <title>Linking a Slider to Edit Box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155568#390586</link>
      <author>Phil Goh</author>
      <description>I'm dabbling with creating GUIs in Matlab. I'm trying to create a very simple GUI &lt;br&gt;
that consists of a slider and a text box. What I would like to do is for the slider &lt;br&gt;
to update the value of the text box and the text box to update the position of &lt;br&gt;
the slider.&lt;br&gt;
&lt;br&gt;
I'm able to retrieve the data from the text box and slider with the get(hObject, &lt;br&gt;
'Value') function in their respective callback functions, but I do not know how to &lt;br&gt;
trigger the update. How do I update the value of the textbox in the slider &lt;br&gt;
callback function? and vice versa?&lt;br&gt;
&lt;br&gt;
Any help would be much appreciated.&lt;br&gt;
&lt;br&gt;
Phil</description>
    </item>
    <item>
      <pubDate>Mon, 03 Sep 2007 18:42:07 -0400</pubDate>
      <title>Re: Linking a Slider to Edit Box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155568#390588</link>
      <author>Jerome Briot</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
use sliderPanel from the FEX :&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13845&amp;objectType=file&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13845&amp;objectType=file&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
J&#233;r&#244;me</description>
    </item>
    <item>
      <pubDate>Mon, 03 Sep 2007 19:22:12 -0400</pubDate>
      <title>Re: Linking a Slider to Edit Box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155568#390591</link>
      <author>Phil Goh</author>
      <description>&quot;Jerome Briot&quot; &amp;lt;dutmatlab@yahoo.fr&amp;gt; wrote in message &amp;lt;fbhkhv$rtg&lt;br&gt;
$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; use sliderPanel from the FEX :&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?&lt;/a&gt;&lt;br&gt;
objectId=13845&amp;objectType=file&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; J&#233;r&#244;me&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Hi, thanks for that component. But that's not what I'm looking for. I'm a novice &lt;br&gt;
to the whole GUI thing and was looking for a way to do it programmatically and &lt;br&gt;
not resort to using someone else's component. The reason I want to do this is to &lt;br&gt;
get a feel for the GUI API in Matlab.&lt;br&gt;
&lt;br&gt;
Thanks&lt;br&gt;
Phil</description>
    </item>
    <item>
      <pubDate>Mon, 03 Sep 2007 21:38:24 -0400</pubDate>
      <title>Re: Linking a Slider to Edit Box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155568#390597</link>
      <author>Lorenzo </author>
      <description>&quot;Phil Goh&quot; &amp;lt;pgnator@googlemail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;fbhmt4$86u$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Jerome Briot&quot; &amp;lt;dutmatlab@yahoo.fr&amp;gt; wrote in message &amp;lt;fbhkhv$rtg&lt;br&gt;
&amp;gt; $1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; use sliderPanel from the FEX :&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?&lt;/a&gt;&lt;br&gt;
&amp;gt; objectId=13845&amp;objectType=file&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; J&#233;r&#244;me&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hi, thanks for that component. But that's not what I'm looking for. I'm a &lt;br&gt;
novice &lt;br&gt;
&amp;gt; to the whole GUI thing and was looking for a way to do it programmatically &lt;br&gt;
and &lt;br&gt;
&amp;gt; not resort to using someone else's component. The reason I want to do this &lt;br&gt;
is to &lt;br&gt;
&amp;gt; get a feel for the GUI API in Matlab.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks&lt;br&gt;
&amp;gt; Phil&lt;br&gt;
&lt;br&gt;
What about something like this:&lt;br&gt;
&lt;br&gt;
(in the edit callback)&lt;br&gt;
textValue = str2num( get(editHandle,'String') )&lt;br&gt;
set(sliderHandle,'Value',textValue)&lt;br&gt;
&lt;br&gt;
(in the slider callback)&lt;br&gt;
sliderValue = num2str( get(sliderHandle,'Value') )&lt;br&gt;
set(editHandle,'String', sliderValue)&lt;br&gt;
&lt;br&gt;
Is that what you're looking for?&lt;br&gt;
Lorenzo</description>
    </item>
    <item>
      <pubDate>Tue, 04 Sep 2007 08:22:04 -0400</pubDate>
      <title>Re: Linking a Slider to Edit Box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155568#390628</link>
      <author>Phil Goh</author>
      <description>&amp;gt; What about something like this:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; (in the edit callback)&lt;br&gt;
&amp;gt; textValue = str2num( get(editHandle,'String') )&lt;br&gt;
&amp;gt; set(sliderHandle,'Value',textValue)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; (in the slider callback)&lt;br&gt;
&amp;gt; sliderValue = num2str( get(sliderHandle,'Value') )&lt;br&gt;
&amp;gt; set(editHandle,'String', sliderValue)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is that what you're looking for?&lt;br&gt;
&amp;gt; Lorenzo&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
That is similar to what I've ended up doing. I store the hObjects of the slider &lt;br&gt;
and edit box in the handle in their respective CreateFcn. This didn't work &lt;br&gt;
before and hence my post, but since then I've discovered I need to insert a &lt;br&gt;
call to guidata, which updates the value of handle.&lt;br&gt;
&lt;br&gt;
So all works now. Thanks a bunch.&lt;br&gt;
&lt;br&gt;
Phil</description>
    </item>
    <item>
      <pubDate>Tue, 04 Sep 2007 22:53:03 -0400</pubDate>
      <title>Re: Linking a Slider to Edit Box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155568#390743</link>
      <author>Paul Mennen</author>
      <description>&amp;gt; use sliderPanel from the FEX :&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13845&amp;objectType=file&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13845&amp;objectType=file&lt;/a&gt;&lt;br&gt;
&amp;gt; J&#233;r&#244;me&lt;br&gt;
&lt;br&gt;
Another slider tool from the FEX is inside the plt routine:&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4936&amp;objectType=file&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4936&amp;objectType=file&lt;/a&gt;&lt;br&gt;
In the plt help file, go to &quot;command line arguments&quot;,&lt;br&gt;
&quot;auxiliary plt functions&quot;, &quot;slider&quot; for a description of&lt;br&gt;
the calling sequence. There are several .m examples in&lt;br&gt;
the demo folder that use this pseudo slider object.&lt;br&gt;
&lt;br&gt;
The plt slider object combines 3 things, the slider,&lt;br&gt;
the edit box, and (optionally) a slider label, which&lt;br&gt;
is often needed when there are multiple sliders or other&lt;br&gt;
controls.&lt;br&gt;
&lt;br&gt;
The plt slider also provides many modes of operation, even&lt;br&gt;
including a logarithmic movement mode (in case you just want&lt;br&gt;
to allow powers of 2 as an example).&lt;br&gt;
&lt;br&gt;
I see that you want to program it yourself, although you&lt;br&gt;
may get some good ideas from plt.&lt;br&gt;
&lt;br&gt;
~Paul</description>
    </item>
    <item>
      <pubDate>Mon, 17 Sep 2007 12:35:49 -0400</pubDate>
      <title>Re: Linking a Slider to Edit Box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/155568#392650</link>
      <author>*- Jessica -*</author>
      <description>GUI with slider panels&lt;br&gt;
&lt;br&gt;
Hi,&lt;br&gt;
I worked with Matlab in the weekend to find out how to use the sliderPanel from Brett Shoelson (&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13845&amp;objectType=file),&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13845&amp;objectType=file),&lt;/a&gt; but I have still problems with that. When I change something or copy the code into my GUI, than nothing works anymore. &lt;br&gt;
&lt;br&gt;
I would like to have a sliderPanel like the &quot;main&quot; one in Bretts example with an additional feature: when I use the first slider and put the slider to the value of 15 then the second slider should start with 16. &lt;br&gt;
&lt;br&gt;
Paul Mennen use that kind of feature in his &quot;winplt&quot; file, (&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4936&amp;objectType=file)&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4936&amp;objectType=file)&lt;/a&gt; but I am a rookie in Matlab and have no idea how to modify the code. &lt;br&gt;
&lt;br&gt;
Can anyone help me to figure out how to do it?&lt;br&gt;
&lt;br&gt;
Thanks in advance&lt;br&gt;
Regards &lt;br&gt;
Jessica</description>
    </item>
  </channel>
</rss>

