|
-
Sep 7th, 2000, 08:04 PM
#1
Thread Starter
Frenzied Member
I'm making an ocx with 1 textbox and after I put that ocx into my program, I want to be able to change the font, fore color, back color, etc. of that text box, no how do I make it so that from the program i can go
Ocx1.
then have Text1 appear in the list so then I do
Ocx1.Text.
then have a list appear with all the functions for that text box
I hope I was clear
thanks in advance
NXSupport - Your one-stop source for computer help
-
Sep 7th, 2000, 11:23 PM
#2
Frenzied Member
You don't. You will need to create properties in your ActiveX control that pass the value to your Textbox's Text property. Like:
Code:
Public Property Get Text() As String
Attribute Text.VB_Description = "Returns/sets the text contained in an object."
Text = Text1.Text
End Property
Public Property Let Text(ByVal New_Text As String)
Text1.Text() = New_Text
PropertyChanged "Text"
End Property
You will need to do this sort of thing for most of the properties of the Textbox except once that are ambient properties such as left, top, width, height, etc..
There is a wizard in VB6 that will allow you to select the properties of the controls within your control to be included in your control's properties.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Sep 8th, 2000, 12:05 AM
#3
Member
http://www.vb-world.net/activex/articles.html
You can refer to this article for more information on creating ActiveX componen.
http://www.vb-world.net/activex/articles.html
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
|