Prototype library website-Original release of lecturer Jin Wu, which can be freely reproduced. Please indicate the source!
Axure Official Website: www.axurerp.cn
Axurerp7.0 function variable operators
Part attributesWidget Functions
This |
The current part, which is selected in the design area. |
Target |
The target part is the part selected when the action is configured in the use case editor. |
Widget. x |
X axis coordinates of the widget |
Widget. Y |
Y axis of a widget |
Widget. Width |
Widget width |
Widget. Height |
Part height |
Widget. scrollx |
Coordinates of the X axis of the dynamic panel |
Widget. scrolly |
Y axis of the dynamic panel |
Widget. Text |
Text Content on the part |
Widget. Name |
Part name |
Widget. Top |
Part top |
Widget. Left |
Left side of the widget |
Widget. Right |
Right of Part |
Widget. Bottom |
Part bottom |
This current part refers to the part selected in the design area
Definition:
This current part refers to the part selected in the design area
Instance:
View case studies
Use this. Text to obtain the text content of the selected part.
Step 1: drag two text parts (rectangles) to the design area
Name it 1 and 2 respectively, and enter any text in Part 1.
Step 2: add an event to Part 1
Select part 1, double-click the current event on the widget interaction panel, and select set text action in the displayed Use Case editor,
In the Configuration action on the right, select the check box before part 2, set the value of Part 2 to [[This. Text] at the bottom, and click OK to close the use case editor.
Press F5 to preview the prototype and view the effect.
Target part refers to the part selected when the action is configured in the use case editor.
Definition:
Target part refers to the part selected when the action is configured in the use case editor.
Instance:
View case studies
In this case, we use [[target. Text] to add text to the selected part (target part) in the Case editor.
Step 1: Drag components to the design area
Drag two text parts (rectangles) to the design area and name them 1 and 2 respectively.
Step 2: add an event to Part 1
In the design area, select Part 1. When you double-click the mouse on the component interaction panel, add the set text action in the pop-up case editor, and select Part 2 in the Configuration action on the right.
Set Part 2 to "[[target. text] change, which means that when you click Part 1, add a "change" Word to the text content of Part 2. Click OK to close the case editor.
Press F5 to quickly preview the prototype.
X axis coordinates of widget. x
Definition:
Widget. X to obtain the X axis coordinates of the specified part;
Instance:
View case studies
In this case, we will obtain the X axis coordinates of the current button and the X axis coordinates of the picture on the left of the button;
Case 1:
Set the value of the Shape button part to [[This. x]
Output: 330
Case 2:
Set the value of the Shape button part to [[lvar1.x]
Lvar1 = image parts
Output: 100
Y axis of widget. Y
Definition:
Widget. y obtains the Y axis of the specified part.
The usage method is the same as the method for obtaining the X axis coordinate of a widget.
View case studies
Widget. Width
Definition:
Widget. width to get the width of a specified part.
Instance:
View case studies
In this case, we use this. width to view the width of the selected Button widget.
In the design area, select the Button widget and double-click the event on the widget interaction Panel. In the displayed Use Case Editor, add the set text widget,
Set the current part value to [[This. Width], and click OK to close the use case editor.
Preview prototype, output: 240
Widget. Height height of the widget
Definition:
Widget. Height: obtains the height of a specified part.
Instance:
View case studies
In this case, we use this. Height to obtain the height of the shape part;
Set the value of the shape part to [[This. Height].
Output: 40
Text Content on widget. Text
Definition:
Widget. Text can get the text content on the specified text part;
Instance:
View case studies
In this case, the widget. Text is used to obtain the text on the widget;
1. Drag two rectangular parts to the design area and name them poem and 1 respectively;
2. add content to the component poem;
3. Add a mouse click event to part 1, add a set text action in the Force editor that appears, select the current part in the Configuration action, and set the value of Part 1. Click FX to add a local variable in the pop-up edit text dialog box, set lvar1 = component poem, and click Insert variable, attribute, function, or operator on the top of the dialog box to insert the local variable lvar1.
4. Click "OK" twice to return to the design area. Press F5 to preview the page.
Output:
Since childhood, I have been attacking the history of the past and have grown to have the right to seek help. Just like a tiger lying in a desert Hill, the latent claw teeth endure.
Unfortunately, the cheek of the thorn is comparable to that of jiangzhou. If he had to report revenge, his blood would be stained in Yangjiang!
Widget. Name part name
Definition:
Widget. Name: get the name of the specified part
Instance:
View case studies
In this case, we use this. Name to obtain the name of the clicked part.
1. Drag the shape button to the design area and name it.
2. add a mouse click event to the shape Button widget. In the displayed Use Case Editor, add the set text action. Select the current widget in the Configuration action on the right and set the widget value to [[this. name]
3. Click "OK" to close the case editor, and F5 preview the effect.
Output: My name is widget. Name.
Widget. Top part top
Definition:
Widget. Top is used to obtain the position or coordinates at the top of a widget.
Widget. Top part top
Left side of widget. Left
Right
Widget. Bottom Part bottom
It is usually used to determine the Coordinate Position of the upper and lower sides of a component or whether the upper and lower sides of a component are intersecting;
Instance:
View case studies
In this case, we will give a comprehensive explanation of the above part attributes,
When we drag Part 1,
If the top of part 1 is smaller than 100, move it to the position before dragging;
If the bottom (bottom) of Part 1 is greater than 200, move it to the position before dragging;
If left of part 1 is less than 300, move it to the position before dragging;
If the right side of part 1 is greater than 500, move it to the position before dragging;
1. Add ongoing items to Part 1 (dynamic panel). Double-click the ongoing action to add a move action in the case editor. In the Configuration action, set the dynamic panel to drag;
2. Add a drag-and-Stop event to Part 1. Add the following example:
Case1: If "[[lvar1.top]" <"100"
Move the dynamic panel to the position before dragging
Case2: else if "[[lvar1.bottom]"> "200"
Move the dynamic panel to the position before dragging
Case3: else if "[[lvar1.left]" <"300"
Move the dynamic panel to the position before dragging
Case4: If "[[lvar1.right]"> "500"
Move the dynamic panel to the position before dragging
Widget. scrollx coordinate of the X axis of the dynamic panel
Definition:
Widget. scrollx coordinate of the X axis when the dynamic panel is rolling;
Syntax:
Widget. scrollx
Widget. scrolly coordinate of the Y axis of the dynamic panel
Definition:
Widget. scrolly coordinate of the Y axis when the dynamic panel is rolling;
Syntax:
Widget. scrolly
Axurerp7.0 tutorial axure part functions