Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6SP5: for Critical Analysis: Input mask in a textbox to b
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
VFP6SP5: for Critical Analysis: Input mask in a textbox to b
Divers
Thread ID:
00773410
Message ID:
00773410
Vues:
44
Hi all

I have this idea that there are, IMO atleast, three types of business numeric value (please note the Indian comma system):
1. Qty.           Input Mask: 9,99,99,999.999
2. Rate           Input Mask: 99,99,999.9999
3. Amount         Input Mask: 99,99,99,999.99
I have this general concept that I would want to keep all of the above types of fields currency. As VFP does not have user-defined type of field mapping. Just one mapping each for currency, integer, etc.

I have put in the following working logic in the init() of my textbox class associated with the currency.
*** if currency or numeric, float, double, integer
IF INLIST(TYPE("THIS.VALUE"), "Y", "N")
	DO CASE
		CASE "amount"$LOWER(THIS.COMMENT) OR "amt"$LOWER(THIS.COMMENT)
			THIS.INPUTMASK = goApp.GetSetting("General", "Amount Format", "99,99,99,999.99")

		CASE "quantity"$LOWER(THIS.COMMENT) OR "qty"$LOWER(THIS.COMMENT)
			THIS.INPUTMASK = goApp.GetSetting("General", "Quantity Format", "9,99,99,999.999")

		CASE "rate"$LOWER(THIS.COMMENT)
			THIS.INPUTMASK = goApp.GetSetting("General", "Quantity Format", "99,99,999.9999")
	ENDCASE
ENDIF
1. I know I can have different class for different type of numeric value, but VFP won't ease things if all the fields are currency (there are clients who will want more or less decimals, in special cases on-the-fly).

2. I do not want to miss the fun of drag-n-drop (just recently promoted myself from DOS, so this is dream luxury for me).

3. I have developed a builder to fill in the comment from the DBC field description, this is where I will originally put in the words rate, amt, qty weaved in the description.


I will welcome any feedback and better options that are available from you all.

Appreciating all the previous responses, I have now gathered more confidence in putting forward my views. Thank you, the VFP community as a whole, for sharing, sharing and still more sharing.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform