Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

textbox in a container class 1

Status
Not open for further replies.

shresthaal

Programmer
Jun 8, 2005
62
US
I created a class based on a container from the project manager window. Then I added a text box and a button to the container. The class name is test and the container name is testone. In the button's click button I put this code
"thisform.testone.text1.value = "it works"

Then I dropped this class on a form, and I ran the form to see if it would work. However, I am getting this error "Unknown member testone" as soon as i click on the button.

What am i doing wrong? and what should i be doing?
 

I create a container class called "testone", but when I apply it to a form it takes on the name "testone1". If that is the case, in the click event of the button avoid refering to the container name and use something like:
Code:
this.Parent.text1.Value ="hello"

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top