Mathcad Prime 10 - Textbox Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Mathcad Prime 10 - Textbox Script
Hello,
I am trying to utilize the new advanced controls textbox functionality by changing the background color of the textbox based on the input condition.
The input condition would be a defined variable called "Ratio" and whether or not it is above or below 1.
The textbox would be assigned to the variable "Check", if Ratio is above 1 than check would read "No Good" with a red background, If Ratio is above 1 than check would read "OK" with a green background.
I have been searching through previous posts and had some help but am getting stuck with what appears to be passing in input variable "Ratio". I keep getting the following error.
I have put the file I am working on below for reference.
Solved! Go to Solution.
- Labels:
-
Mathcad Usage
-
Other
-
Programming
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Have you seen this thrread: https://community.ptc.com/t5/Mathcad/Mathcad-Prime-10-Text-Box-Advanced-Controls/m-p/952254/highlight/true#M212069
Looks like it solves your problem.
BTW, the Textbox in the sheet you posted contains no script at all!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Have you seen this thrread: https://community.ptc.com/t5/Mathcad/Mathcad-Prime-10-Text-Box-Advanced-Controls/m-p/952254/highlight/true#M212069
Looks like it solves your problem.
BTW, the Textbox in the sheet you posted contains no script at all!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Werner_E,
Yes I have used that reference you posted. it was very helpful. My issue was adding the input variable when right clicking the textbox box. I should have added my variable this way instead of trying to pass it in within the script. I than can collapse the input variables so only what I want to see is shown.
I appreciate your help.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Fine that you found how to use it - its not really intuitive (especially when we have more than one input value).
You know that you can also hide the lefthand side (the "check:=") and collapse the space it would occupy. That way only the textbox is visible. See Solved: Re: Mathcad Prime 10 TextBox - PTC Community
