scrolling in bpatcher

Gradient's icon

Hi I´m quite a newbie to javascript,So please bare with me.
There is probably a very simple answer on how to do this but I can´t seem to get my head around it..
I need to control the v.scrolling in a bpatcher (in presentation mode) the bpatcher object have the attribute "Enable vertical scrollbar"enabled.(for showing the v.scroll) It scrolls in my main patch, but not in the bpatcher. I use the following script:

autowatch = 1;
inlets = 1;

function msg_int(a)
{
if (inlet == 0)
{
this.patcher.wind.scrollto(0,a);
}
}

I know the bpatcher argument is box, but I can´t get this to work either or how do I apply it?
I´ve attached a test patch, with bpatcher and script for explaining what I´m trying to do.
Does someone has a solution or idea for me?
Any help is much appreciated!

Luke Hall's icon

You should be able to do this with the "offset" attribute to [bpatcher] instead of using wind.scrollto() in a javascript.

lh

Gradient's icon

Thank you both!
the offset atttribute, of course I overlooked that one..