Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Voodoo - Tip Of The Day
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Voodoo - Tip Of The Day
Divers
Thread ID:
00560335
Message ID:
00560335
Vues:
49

Did You Know?



Using Voodoo, you can build reusable web classes. For instance, you can create comboboxes that list all the states in the US. Here's the code that does that:
DEFINE CLASS StateCombobox AS WebCombobox OF voodoo.prg
   LABEL = 'State:'
   Width = 250
	
   FUNCTION OnLoad
      DODEFAULT()
      THIS.AddListItem('*** USA and Canada - Please select a state','--')
      THIS.AddListItem('Alabama','AL')
      THIS.AddListItem('Alaska','AK')
      THIS.AddListItem('Alberta','AB')
      THIS.AddListItem('American Samoa','AS')
      ** More states added here...
   ENDFUNC
ENDDEFINE
You can then simply go ahead and add this combobox to all kinds of pages you want to build, in the following manner:
oPage.AddObject("cmbState","StateCombobox")
oPage.ControlSource = "Customer.State"
Basically, this is as easy as in any VFP form!

Markus




Markus Egger
President, EPS Software Corp
Author, Advanced Object Oriented Programming with VFP6
Publisher, CoDe Magazine
Microsoft MVP since 1995
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform