Change Text Box decimals
Change Text Box decimals
(OP)
Could someone tell me how to change the number of decimals to use on mathcad´s control textbox, when I am using a input variable. Maybe using Edit Script? Thanks.
Sergio
Sergio
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Contact USThanks. We have received your request and will respond promptly. Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines |
|
Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.
Here's Why Members Love Eng-Tips Forums:
Register now while it's still free!
Already a member? Close this window and log in.
RE: Change Text Box decimals
CODE
Rem TODO: Add your code here
End Sub
Sub TextBoxEvent_Exec(Inputs,Outputs)
Value = CDbl(TextBox.Text)
IntVal = Int(Value)
Str = Len(IntVal)
Txt = Left(TextBox.Text,Str+3)
Outputs(0).Value = CDbl(Txt)
End Sub
Sub TextBoxEvent_Stop()
Rem TODO: Add your code here
End Sub
I think, this is what you want. Of course, you'll have to change the "+3" to something else. This gives you only two digits after the decimal point.