Forums > MaxMSP

Disabling user interaction with hslider

August 7, 2007 | 2:17 am

Is there any way to make an hslider entirely invisible to the mouse? I’m trying to use hsliders as displays for position, such as for the current playback position in a loop. Since they’re only being used for display I want to keep them free from user input, and also stop them from interfering with the mouse’s movement.

Sending the message "local 0" as in the reference manual is stopping the mouse from moving the slider, but isn’t stopping the slider from affecting the mouse. After setting "local 0", if I accidentally click and drag on an hslider the cursor disappears until the mouse is released, and then resets to the location of the original click. This gets in the way for me, as I basically want the hslider to act as an image.

I’ve tried making a couple alternatives with Jitter, but I haven’t come up with anything that uses so little CPU, especially at such a high refresh rate.


August 7, 2007 | 2:28 am

That looks like a bug to me. hslider with "local 0" is definitely still responding to mouse clicks (it outputs new values as I drag the mouse), it just doesn’t move the position of the slider.

As a workaround, how about a ubutton that is set to not highlight on mouse click:

#P user ubutton 36 40 176 41 0 2;
#P window setfont "Sans Serif" 9.;
#P number 51 91 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user hslider 52 48 18 128 128 1 0 0;
#P connect 0 0 1 0;
#P window clipboard copycount 3;

-Adam


August 7, 2007 | 2:42 am

Select the object, then under the object menu select "ignore click"
David

On Aug 6, 2007, at 7:17 PM, Aaron Faulstich wrote:

>
> Is there any way to make an hslider entirely invisible to the
> mouse? I’m trying to use hsliders as displays for position, such as
> for the current playback position in a loop. Since they’re only
> being used for display I want to keep them free from user input,
> and also stop them from interfering with the mouse’s movement.
>
> Sending the message "local 0" as in the reference manual is
> stopping the mouse from moving the slider, but isn’t stopping the
> slider from affecting the mouse. After setting "local 0", if I
> accidentally click and drag on an hslider the cursor disappears
> until the mouse is released, and then resets to the location of the
> original click. This gets in the way for me, as I basically want
> the hslider to act as an image.
>
> I’ve tried making a couple alternatives with Jitter, but I haven’t
> come up with anything that uses so little CPU, especially at such a
> high refresh rate.


August 7, 2007 | 2:42 am

Thank you! That workaround is so elegant and simple that I probably wouldn’t ever have thought of it.

As an edit to my original post, what I said before about the mouse resetting to where the first click occurs wasn’t correct. When the mouse is released, the cursor jumps to the position where the hslider was on the initial click.


August 7, 2007 | 2:47 am

Thanks, that’s even better!


August 7, 2007 | 2:59 am

At 8:17 PM -0600 8/6/07, Aaron Faulstich wrote:
Is there any way to make an hslider entirely invisible to the mouse?

The same way as any object:
– Right click on the object (Or control-click w/ one button mouse on Mac)
– In the resultant popup menu, select "Ignore Click"

-C


Chris Muir | "There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue." – Brian Eno


August 7, 2007 | 3:20 am

Quote: David Beaudry wrote on Mon, 06 August 2007 19:42
—————————————————-
> Select the object, then under the object menu select "ignore click"
> David
>

Ahah! Thanks David. I knew I had seen that before and was looking in the "get info" menu and thought "maybe hslider doesn’t support that feature". Funny how when you see the same thing every day without using it you start to tune it out.

Now I can’t imagine what the point of hslider’s "local 0" feature is.

-Adam


August 7, 2007 | 8:09 am

the 00 Location of Max.


Viewing 8 posts - 1 through 8 (of 8 total)