How to Move "Widget Foo" to X,Y of "Widget Bar"?

Two questions

  1. How does one create a button so that OnClick “Widget Foo” is moved to the position X,Y of “Widget Bar”?

I tried this two ways

Move “to” x: [[bar.x]] and Move “to” x: [[]]

  1. is there a link to a good reference on Axure that explains these kinds of things clearly or a link that defines each of the functions and how they work?

You’re so close. [[bar.x]] is right, except you can’t just directly reference widgets by name because widget names are not unique. Instead hit the fx button next to the field and in the bottom half of the expression editor that opens add a new Local Variable. You can name it bar and then in the drop down next to it choose Widget and then choose which widget. Now in this expression only (the local part) bar will reference that widget and you can access its x and y properties.


Thanks! That’s the missing link

As for your question about a reference: I haven’t seen a good one in a while (though there might have been one someone posted at some point on these forums). Most of the widget properties are fairly self explanatory. Nearly all the string, math, and date functions are functionally equivalent to the JavaScript methods of the same name, so sources like MDN are great to read up on those.

There are a few caveats though, some functions don’t have their complete capabilities in Axure like they would if you were writing JavaScript. For example, the String.replace() function doesn’t accept a RegEx in Axure as its first parameter. Some of the Date functions are also Axure-specific helper functions so you won’t find those documented on the web, but they tend to be pretty simple and straightforward too.

The repeater ones are a little more confusing. Most of them are in context of Item. These are usually used on the OnItemLoad event of a repeater which gets executed for every row in the repeater. When this happens, Item refers to the current row being evaluated as the repeater iterates through each row and applies your cases and actions.


Can you explain this one?
I am trying this but did not get your explaination, sorry

What part specifically are you having trouble with?

This is the Axure reference page for using widget properties, math, and strings in expressions, as nkrisc has done:

1 Like