Textbox Renaming problem

Stryker15
09-06-2003, 10:52 PM
I have a small question, I am having problems renaming a Textbox at runtime, such as renaming Text1 to TextT on a command1 click. When I press Command1 I get an error saying Compile Error: Cannot assign to read-only property. Here is my code

Private Sub Command1_Click()
Text1.Name = TestT.txt
End Sub


I am not sure if this is actually possible changing the name of the textbox at runtime. But if you know how, could you show me, I really have no clue other than what I did LoL.

Thinker
09-06-2003, 11:06 PM
No, it isn't possible. Why do you want to do this?

Stryker15
09-06-2003, 11:10 PM
No, it isn't possible. Why do you want to do this?

Well, I am making a program that makes scripts for a computer game I play, and I really don't have enough room to put all of the textboxes, so I was trying to rename the textboxes to give them more properties, but if there is a way to make tabs that you can go into sections of the program that would be great!

Thinker
09-06-2003, 11:12 PM
Use the Microsoft Tabbed Dialog control. And you can make control
arrays and load and unload them at run time.

Stryker15
09-06-2003, 11:48 PM
Use the Microsoft Tabbed Dialog control. And you can make control
arrays and load and unload them at run time.

Ah thank you, I've searched google for a Tabbed Dialog control tutorial, I didn't come up with much, do you know somewhere that might have some more info on this?

Chris J Locke
09-07-2003, 12:09 PM
There are two tab controls with VB. Steer clear of the 'Tab strip' one in the common control pack, but use the 'Microsoft Tabbed Dialog' one. It defaults to Win 3.1 stylee, so change the style to 1 - Property page (very Win9x...)
Thats about it. In design time, click the tab you want, set the caption to what you want to call the tab, and draw any controls you want on it. The control handles everything else.
When distributing the .EXE, it will also need the tabctl32.ocx file.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum