By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,924 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

How do you pass an object by reference to a property during design?

P: n/a
How do you pass an object reference to a property during design? In
other words, I would like to type the name of the object in on the
properties window and then use that object to do neat stuff.

See my code below. This is just experimental code but when I add
testit to my form then the Wayne property is grayed out.

Public Class testit
Inherits TextBox
Private m_Wayne As Object = New Object

<Browsable(True)> _
Property Wayne() As Object

Get
Return m_Wayne
End Get
Set(ByVal Value As Object)
m_Wayne = Value
End Set
End Property

End Class
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You will need to create a Type Editor for your class. The Type Editoris the
object that allows a drop down or other control to be displayed in the
properties window at design time. Without it, the properties window does
not know what you might want to assign to the property.

here is the base link for the MSN topic.

http://msdn.microsoft.com/library/de...asp?frame=true

Kirk Graves

"Wayne" <VB******@hotmail.com> wrote in message
news:5f**************************@posting.google.c om...
How do you pass an object reference to a property during design? In
other words, I would like to type the name of the object in on the
properties window and then use that object to do neat stuff.

See my code below. This is just experimental code but when I add
testit to my form then the Wayne property is grayed out.

Public Class testit
Inherits TextBox
Private m_Wayne As Object = New Object

<Browsable(True)> _
Property Wayne() As Object

Get
Return m_Wayne
End Get
Set(ByVal Value As Object)
m_Wayne = Value
End Set
End Property

End Class

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.