Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Voodoo - Tip Of The Day
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Voodoo - Tip Of The Day
Miscellaneous
Thread ID:
00560335
Message ID:
00560335
Views:
48

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
Next
Reply
Map
View

Click here to load this message in the networking platform