I need to write the value that will be entered in the textarea to the setpoint speed out area (this must be limited to values between 900 and 1700; when there is nothing written in it, the value must be without characters). When clicking on "Change SetPoint Speed," it is necessary to move the values from the textarea to the setpoint speed out and delete the characters from "change setpoint speed out." If you can help me, I appreciate it.
A better user interface would be:
Create a tag binding on the speed value.
When the user presses the button to edit show a popup view.
You can make the popup view reusable for editing any setpoint in your project by adding parameters. For example:
- TagPath
- CurrentSetpoint
- EngUnits
- RangeLowLimit
- RangeHighLimit
- Title
Then,
- Bind the setpoint now value to the CurrentSetpoint view parameter.
- Bind both "units" text to the EngUnits parameter property.
- Create an expression binding on the Range text to use both RangeLowLimit and RangeHighLimit.
- Create an expression binding on the Range display color property to change it to red if out of range and black if in range.
- Disable the Enter button if out of range.
- Use the Enter button's onActionPerfromed1 to write to the tag using system.tag.writeBlocking. Then close the popup.
1 Be aware that the onClick event runs whether or not the button is enabled. You don't want that so use onActionPerformed.
Points of style:
- Why has the "Change SetPoint Button" got a green background? What useful and important information does this convey? To me it looks like visual clutter and is a distraction from the actual data.
- Why is the text bold? What style guide are you following or who's GUI are you trying to emulate?
- Why are your labels center-justified? The labels should be left-justified and the numeric values right-justified. Have a look at how professionally designed applications (such as Ignition itself) are laid out.
2 Likes