Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to show + or - with numeric textbox?
Message
From
23/02/2000 17:36:11
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00336230
Message ID:
00336368
Views:
18
Yep, it can be done by converting to a string, but as you pointed out, it's non-trivial. I was hoping for an easy way or some property setting I'd missed.

Thanks for the help.

>I don't think these's any easy way.
>
>What if you had two controls. One that was invisible (same fore/background color as the form). This one has a ControlSource of your data. When it changes (ProgrammaticChange), initiate a method that re-displays the other TextBox that is a character field showing iif(X>0, "+" + str(X), str(X)). You get the idea.
>
>While on this topic, is there some event in VFP that fires when a property changes? I forget what this is called, but it was new in 5.0 or 6.0. I think it had to do with a method being fired when a property changes. I think it was new in 6.0, but it is a distant memory at this point...
>
>Joe
>
>
>>A numeric textbox will always show a - (minus sign) before a negative number. However, I would like to explicitly show a + (plus sign) when the number is positive, and neither when it is zero.
>>
>>I couldn't find an InputMask or Format property that would do this. Am I missing something? BTW VFP 5.0a.
>>
>>TIA.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform