some attributes don't work for custom controls


C

Christian

Hi,

I'm developing a customcontrol and try to add some design-time support for
my control by using attributes.

Unfortunately only the 'CategoryAttribute' works well when I drag my control
on a client-form and open the properties-window for the control
'DefaultProperty', 'ToolboxBitmap', 'DefaultValue' do not work properly


<DefaultProperty("MyMAXSTATE"), _
ToolboxBitmap(GetType(MyCounterboxCustomControl), "CustomControl.ico")> _
Public Class MyCounterboxCustomControl
Inherits System.Windows.Forms.Control

.....

<CategoryAttribute("MIN-MAX"), DefaultValue(5)> _
Public Property MyMAXSTATE() As Byte
Get
Return m_bMAXSTATE
End Get
Set(ByVal Value As Byte)
m_bMAXSTATE = Value
Invalidate()
End Set
End Property
End Class

thanks for any help

Chris
 
Ad

Advertisements

H

Herfried K. Wagner [MVP]

* "Christian said:
I'm developing a customcontrol and try to add some design-time support for
my control by using attributes.

Unfortunately only the 'CategoryAttribute' works well when I drag my control
on a client-form and open the properties-window for the control
'DefaultProperty', 'ToolboxBitmap', 'DefaultValue' do not work properly

Please be more specific. What doesn't work. What would you expect to
occur?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top