Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's dynamic about DynamicInputMask?
Message
De
28/11/2003 12:08:30
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
28/11/2003 11:37:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00854232
Message ID:
00854240
Vues:
79
This message has been marked as the solution to the initial question of the thread.
>From the online help:
>
>The following demonstrates a typical format for cInputMask:
>
>Column1.DynamicInputMask = "@R$ ###,###,###.##"
>For additional information about the format of cFunction and cMask, see the Format and InputMask properties.
>
>Now why anyone would want to hardcode something that's supposed to be dynamic is beyond me, but I guess, as Ed Rauh, may the Lord bless his soul, once replied to one of my frequent questions: It may be one of those cases where I'm totally clueless.
>
>The reason I'm asking, is because I have a customer who, depending on the data, would like the individual fields in a row (not column) formatted according to the number of decimals in the nDecimals field in the underlying table.
>
>So something like this came to mind:
>
>.Column1.DynamicInputMask = ;
>'#####'+ IIF(cTable.cField > 0,'.'+ REPLICATE('#',cTable.cField),'')
>
>As far as I can see, that does nothing.
>
>Any ideas on how to achieve this?
>
>
>TIA
>
>Peter

Peter,
Help says about static inputmask. A dynamic one typically uses iif() or another expression. However if the expression is invalid it doesn't error but doesn't display something changed.

Suppose I keep all values in the same table w/o currencies and any value above 2000 is TL while 2000 or less is $ (well I certainly don't do that:) :

myGrid.Mycolumn.DynamicInputMAsk = ;
[(Iif(myTable.amount<=2000,"@R$ ##,###","@R ###,###,###.##TL"))]

PS: I might well set the currency check part on myTable's currency field and set inputmasks accordingly.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform