How do I access Scroll values of widgets other than "this"?

Hi
I am building a Drag & Drop mockup. The drop area is a horizontally scrolling panel. I want the dragged dynamic panel to activate the scroll when it is over a designated zone at the edge of the scrolling panel.

For this I put in the action
OnDrag move <My-Scrolling-Panel>by so and so pixels.

So far it works.

Here is my problem - I want to limit the scroll movement to the x size of the scrolling panel and for this I wanted to check the scrollX position.

Checking a panel’s scroll with an action belonging to the panel works. I use [[this.scrollx]] as a variable.
Checking panel’s scroll position from an action belonging to the dragged object, [[My-Scrolling-Panel.scrollx]] does not work.

Any ideas?

define the widget as local variable in the bottom area of the window.
take care, you need the widget, not text of widget.

Thanks for the reply,
Asas, I did not understand what you mean:

  1. “define the widget as local variable” - Which widget? I understand how a widget’s property can be stored in a LVAR but how can you store “a widget”?

  2. " in the bottom area of the window" What? Why?

Thanks, YG

Select widget instead widget.text in the droplist.


Is there any way i could get rp for this? I have same problem. I want to track horizontal scroll position of every dynamic panel INSIDE dynamic panel with scroll (not browser). I have hard time because Axure is only letting dor browser window to track with Window.ScrollX.

My rp:
Scrolling panel.rp (55.7 KB)

As seen in the screenshot above your post, set the widget as a local variable then you can use the scrollX property of that widget.

Window.scrollX will always be the browser window’s scroll because that’s what Window is.

I try it before and i just could not make it work. It display nothing when i set local variable on widget and set scrollX.

Here’s an example:

panel-scroll-x.rp (54.1 KB)

Note that you can’t set scrollX, you can only read it.

I do not know why in my case did not work as i was working, but this works. Altho the thing i was looking for is to show scroll position all the time. So i put [[LVAR1.scrollX]] onScroll event of panel and display text. It works. Thank you