Learn how to use a local variable to access the [[width]] and [[height]] properties of any widget. Explore how to resize widgets based on the width and height of other widgets.
- [Instructor] We can access the width or height…of any widget on our canvas by defining a local variable…for that widget and then using .width or .height.…This will let us resize any widget we want…to match the size of another widget on our canvas.…What we'll do here is set it up…so that whenever we click on this resize button,…we resize our small square on the right…to match the size of the large square on the left.…I'll click on our button and set up an action…in the on-click event.…I'll select set size and select our small square.…We wanna make this small square…match the size of our large square,…so let's start with the width and click on the fx button.…
Delete this 60 that's in here, and now what we need to do…is add a local variable for our large square widget.…I'll call it large square.…It doesn't really matter what the variable is called,…but once we've got that local variable,…we can either select it from the list…of local variables here, or we can just type it in…in the double square brackets.…Then we'll be able to type .width…
- Using variables in Axure
- String methods in Axure
- Truncating text strings
- Formatting dates and times
- Setting up a looping animation
- Setting up a responsive background image
- Positioning widgets in the browser
- Repeater and item properties
Skill Level Advanced
1. Widget Properties
3. Dates and Times
4. Window Properties
5. Repeater and Item Properties
6. Global Variables
Global variables2m 14s
Using plugins on Axure Share2m 49s
8. When Things Go Wrong
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.