Path: news.mathworks.com!not-for-mail
From: "matt dash" <n.a@mail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Listbox mousedown problems
Date: Tue, 13 May 2008 04:09:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 26
Message-ID: <g0b48v$pu8$1@fred.mathworks.com>
References: <g09d97$ir0$1@fred.mathworks.com> <g09toa$j63$1@canopus.cc.umanitoba.ca> <g0altk$221$1@fred.mathworks.com>
Reply-To: "matt dash" <n.a@mail.com>
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 1210651743 26568 172.30.248.38 (13 May 2008 04:09:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 13 May 2008 04:09:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 939004
Xref: news.mathworks.com comp.soft-sys.matlab:468048


"helper " <spamless@nospam.com> wrote in message
<g0altk$221$1@fred.mathworks.com>...
> > Did you try recording the Value parameter of the listbox 
> before
> > the change and then setting the Value of the listbox after
> > the String has changed? The Value parameter controls 
> which line
> > of the listbox is the current line.
> 
> That will not work for me.
> 
> The problem is that although the mousedown event changes 
> which element appears to be selected on the listbox, and 
> causes the editbox callback to fire, it does not change 
> the "Value" property in MATLAB.  The "Value" property does 
> not change until the mouseup event.
> 

This sounds a lot like my problems of trying to make a
scrollbar that you can click and drag.... same thing, you
can't do it with the window motion function because the
value doesn't update until the upbutton. I got around it by
using the java callbacks. You might give that a try if
you're desperate, though I'm not sure what kind of java
callbacks a listbox has. (I used findjobj on the file
exchange and worked from there.)