Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rename form object at run-time while form is in use?
Message
From
28/08/2001 11:33:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00549854
Message ID:
00549866
Views:
22
>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!!!

I don't ask you why :) Name property is read&write. Causes that may result are up to you (like something referencing the old name).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform