Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating buttons programmatically
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00270841
Message ID:
00270851
Views:
27
Mac,

Assuming a method inside the form

lnTop = 0
scan
   lcName = "cmd" + tree.species
   this.AddObject( lcName, "ButtonClass" )
   with eval( "this." + lcName )
      .Visible = .t.
      .Caption = tree.species
      .Top = lnTop
      lnTop = lnTop + .Height + 5
   endwith
endscan
>I have an application that will be using a touch screen, no keyboard or mouse. I would like to go to a file and create a button for each record in the file. This file could change so the buttons would need to change. Ex. A table has 6 item in it, (pine, hdwd, cedar,oak,poplar and ash) I would like to display these on a form and have the use touch a button to pick a tree. If this table gets updated(more species or less) I would like the buttons to update also.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform