[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Callback function
From: |
Ben Abbott |
Subject: |
Re: Callback function |
Date: |
Mon, 10 Mar 2014 09:14:47 -0400 |
On Mar 10, 2014, at 8:59 AM, FM <address@hidden> wrote:
> Hi,
>
> I want to use the callback function 'WindowButtonMotionFcn' in a figure. But
> the callback function is neved called. As a simple example consider
>
>> hfig = figure;
>> set(hfig, 'WindowButtonMotionFcn', @Test)
>> set(hfig, 'WindowButtonDownFcn', @Test)
>
> The function test.m prints simple a message.
>
> function Test(hObj, event)
>
> disp('I am in the callback function')
>
>
> Now if someone clicks into the figure, the message occurs but it don't occur
> when the mouse is moved. What am I doing wrong?
>
> Best regards
> FM
I'm running the last release (3.8.1) and am using the FLTK graphics toolkit.
With the commands below, the message is displayed for each mouse click and
displayed repeatedly as I drag the mouse (with the mouse button down).
Test = @(hObj,event) disp ('I am in the callback function');
hfig = figure;
set (hfig, 'WindowButtonMotionFcn', Test)
set (hfig, 'WindowButtonDownFcn', Test)
What version of Octave are you running, and did you hold down the mouse button
while moving the mouse?
Ben
- Callback function, FM, 2014/03/10
- Re: Callback function,
Ben Abbott <=
- Re: Callback function, FM, 2014/03/10
- Re: Callback function, Ben Abbott, 2014/03/10
- Re: Callback function, FM, 2014/03/11
- Re: Callback function, c., 2014/03/11
- Re: Callback function, Ben Abbott, 2014/03/11
- Re: Callback function, FM, 2014/03/11