Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formating display of floating point numbers
Message
De
09/08/2011 15:22:03
 
 
À
09/08/2011 11:08:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01520460
Message ID:
01520531
Vues:
54
>>>>I have *lots* of fields that are B(16)
>>>>
>>>>If I want to display that number rounded to the fourth decimal, for example, in a textbox what are my options for formatting the display ( assuming not just creating a dummy display field and converting the number )
>>>>
>>>>Seems there should be an easy trick to it, but I'm not seeing a format that looks right and I can't use an input mask for display - or can I ?
>>>
>>>Why not ?
>>>Perhaps transform() function might be helpful as well.
>>>
>>>Hey, You better be careful ! Where you are at, one nasty bug might cost world economy trillions of dollars.
>>>Uuuups... There goes another 500pts plunge ... {g}
>>
>>Yes, friends and family have noticed that since I have been consulting at Dow Jones the index has not been ... climbing <g>
>>
>>But the software I am redesigning hasn't gone into production yet, so if I am lucky the release will coincide with the up that will eventually come after the down.
>>
>>Or maybe I'll just build something in to make it *look* like an up, anyway <bg>
>
>with a stand alone textbox you can put the code into the textbox refresh method:
>
>textbox::Refresh && load the value
>this.InputMask = ICASE(m.this.value=CONDITION1,MASK1,CONDITION2,MASK2....)
>NODEF
>
>
>on grid the dynamicInputMask is not stable
>then you can work with dynamicCurrentControl
>o another other dynamic expression.

Thanks. I have been away from VFP for a while and especially in UI I have forgotten a lot of the techniques.


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform