|
-
Nov 29th, 2005, 12:38 PM
#1
Thread Starter
Lively Member
Enhance the TextBox control
1. I created a new ActiveX control. (named "myTextBox")
2. I put a TextBox control onto the UserControl.
3. I created a Text property.
4. I checked "Property is DataBound" and "This property binds to a datafield" in Tools/Procedure Attributes dialog for the Text property.
When I put my control onto a form I can set its DataSource, DataMember and DataField properties. Everything is ok, but I cant refer to its DataSource property from code:
myTextBox.DataSource /Error "Method or Datamember not found!"
When I update the recordset (bounded to myTextBox) I would need to rebind its DataSource property, but I cant.
5. I created DataSource property for myTextBox.
It causes error: "Ambiguous name detected ~"
Beacuse it already has a DataSource property behind my code.
plz help
I starting to get crazy and jump out the window, I have been working on this problem for a week. I tried out all possibilities and DOESNT WORK! I just want to create a new data-sink TextBox control with 1 Text property.
-
Nov 29th, 2005, 11:04 PM
#2
Re: Enhance the TextBox control
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Nov 29th, 2005, 11:11 PM
#3
Re: Enhance the TextBox control
er, I just had a thought. You cannot create a Public Property on a usercontrol that already exists (as you have correctly surmized). DataSource may be an existing Property on the default Usercontrol control that exists on the GUI only (not accessible through code).
Did you use the Wizard to create your Usercontrol, or make it from scratch?
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|