Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Listbox mousedown problems
Date: Tue, 13 May 2008 04:29:03 +0000 (UTC)
Organization: Timothy S. Farajian, Inc.
Lines: 26
Message-ID: <g0b5ef$2k6$1@fred.mathworks.com>
References: <g09d97$ir0$1@fred.mathworks.com> <g09toa$j63$1@canopus.cc.umanitoba.ca> <g0altk$221$1@fred.mathworks.com> <g0b48v$pu8$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210652943 2694 172.30.248.37 (13 May 2008 04:29:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 13 May 2008 04:29:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1272923
Xref: news.mathworks.com comp.soft-sys.matlab:468050



> 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.)


Check bullet #2 on my original post.

I tried this, but I can't seem to actually get the 
MousePressedCallback to fire.  Some of the java callbacks 
will fire (e.g., MouseMovedCallback, 
PropertyChangedCallback), but some won't (e.g., 
MousePressedCallback, MouseReleasedCallback, 
MouseClickedCallback).  I tried:

hListJava = findjobj(hListbox);
hListJava.MousePressedCallback =...
   @(x,y)disp('Mouse Pressed');

However, no callback fires.  Any ideas what I am doing 
wrong?