Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rename form object at run-time while form is in use?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Rename form object at run-time while form is in use?
Divers
Thread ID:
00549854
Message ID:
00549854
Vues:
39
I have a form with a bunch of textboxes layed-out kind of like a spreadsheet. Don't ask me why they didn't use a grid. I am modifying an existing form.

On my form I have for example -

Name = txtMyTextbox1, ControlSource = Person1
Name = txtMyTextbox2, ControlSource = Person2

And a command button -
THISFORM.txtMyTextbox1.ControlSource = Person1
THISFORM.txtMyTextbox2.ControlSource = Person2
THISFORM.Refresh

What I want to do is have another command button that does the following -
THISFORM.txtMyTextbox3.ControlSource = Person3
THISFORM.txtMyTextbox4.ControlSource = Person4
THISFORM.Refresh

But I want to rename txtMyTextbox1 to txtMyTextbox3 and also rename the ControlSource from Person1 to Person3. Like-wise for txtMyTextbox2. How can you rename the name of the objects when the form is already displayed using the command buttons to switch the objects names back and forth between two different sets of names?

TIA!!!
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform