Disabling a Property of a Control

  • Thread starter Thread starter Dino Buljubasic
  • Start date Start date
D

Dino Buljubasic

Hi,

Is there a way to disable a property of a contorl so it shows grayed
inside Properties box.

Say I hava a custom buildt panel that inherits from Panel class and
want to draw my own border. So I need to set Panel's Border property
to none and then disable it so I can draw my own.

Any help will be appreciated.

_dino_
 
Just Shadow the base class BorderStyle Property and set its to Browsable
attribute to false.

<Browsable(False)> _
Public Shadows Property BorderStyle() As BorderStyle
Get
Return MyBase.BorderStyle()
End Get
Set(ByVal Value As BorderStyle)
MyBase.BorderStyle = Value
End Set
End Property
 
Thanks

_dino_


Just Shadow the base class BorderStyle Property and set its to Browsable
attribute to false.

<Browsable(False)> _
Public Shadows Property BorderStyle() As BorderStyle
Get
Return MyBase.BorderStyle()
End Get
Set(ByVal Value As BorderStyle)
MyBase.BorderStyle = Value
End Set
End Property
 
Back
Top