Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Project!! Address/Phone Number superclass
Message
De
30/11/1997 19:50:52
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
25/11/1997 19:57:42
Jon Griffin
Computer Nerds, Inc.
St. George, Utah, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00062315
Message ID:
00062972
Vues:
24
>I am about to embark on an idea that has been bothering me for several >years. I deal with international addresses in almost all of my applications >and want to create an editing/entry system that looks localized based on >the country norms. > >This is not a request for technical assistance, it is more of a request for >creative input. I am wondering if anyone else would like to help me develop >this "super class". > >I will upload my thoughts in the next day or two and hope some others want >to help. Probably you'd need a country code to be chosen first, then some code to rearrange the order the zip code, city, street, number etc appear, and change their taborders and input masks accordingly. The part for my country should go like this:
thisform.lockscreen=.t.
do case
....
case countrycode="YU"
   with thisform.zipcode
      .inputmask="99999"
      .tabindex=4
      .top=thisform.vpositions(4)
   endwith
   with thisform.city
      .inputmask=""
      .tabindex=5
      .top=thisform.vpositions(5)
   endwith
   with thisform.street
      .inputmask=""
      .tabindex=2
      .top=thisform.vpositions(2)
   endwith
   with thisform.houseno
      .inputmask=""
      .tabindex=3
      .top=thisform.vpositions(3)
   endwith
....
endcase
thisform.lockscreen=.f.
thisform.refresh
This way the fields get rearranged according to the country preferences; you can call this code from any suitable method in countrycode. Some countries have zipcode + city, some city + zipcode; some have number+street, some street+number, sometimes you should put city row after street row, sometimes before. You should probably need to set up some array of .left and .top coordinates (I've supposed you had thisform.vpositions already arranged); you should arrange the labels too as you move the textboxes. Finally, you don't have to keep all of this info in code, you can put it into the country lookup table (provided you issue some defaults) and have very little code to arrange elements as you pick another country. Ah, another one - this code should fire only if country changes.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform