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

Adding items to property window

P: n/a

I have this custom class. When I select it in the designer, I can't get
the property "SelectedBackColor" to show up. Any help? Thanks
Chris

Public Class FormatedTextbox
Inherits Windows.Forms.TextBox

Dim m_SelectedBackColor As Color
Dim m_OrigBackColor As Color

Public Property SelectedBackColor() As Color
Get
Return m_SelectedBackColor
End Get
Set(ByVal Value As Color)
m_SelectedBackColor = Value
End Set
End Property

Protected Overrides Sub OnGotFocus(ByVal e As System.EventArgs)
m_OrigBackColor = Me.BackColor
Me.BackColor = m_SelectedBackColor
End Sub

Protected Overrides Sub OnLostFocus(ByVal e As System.EventArgs)
Me.BackColor = m_OrigBackColor
End Sub
End Class
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Off the top of my head

Try the <Browsable(True)> _
attribute above the property. Its in System.Runtime.Interop class

This will work for a control, but not for a class added to the project. That
will only show up when using the property in code

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #2

P: n/a
"Crouchie1998" <cr**********@spamcop.net> schrieb:
Off the top of my head

Try the <Browsable(True)> _
attribute above the property. Its in System.Runtime.Interop class


I think that you wanted to type "'System.ComponentModel' namespace".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.