Help with custom property.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have added a ProgressBar control to StatusBar control and created a custom
property as below, to show the properties of the ProgressBar in Property
Window of StatusBar.

<Browsable(True)> _
Public Property ProgressBar() As ProgressBar
Get
Return ProgressBar1
End Get
Set(ByVal Value As ProgressBar)
ProgressBar1 = Value
End Set
End Property

This does shows the ProgressBar property in the Property Window of StatusBar
control with a expander node a + sign. When I click the node it drills down
the properties of ProgressBar. But there is a problem, this gives a drop down
box as well next to the ProgressBar property where user can assign another
ProgressBar control to it.

I don’t want this. All I want it to show just the properties of ProgressBar
control which is already added to the StatusBar control with a Heading
“ProgressBar†properties.
 
Job Lot,
Have you tried making the ProgressBar property ReadOnly?

<Browsable(True)> _
Public ReadOnly Property ProgressBar() As ProgressBar
Get
Return ProgressBar1
End Get
End Property

Hope this helps
Jay
 
that did work thanks.

Is there any way to make the ProgressBar property work similar to Panels
property of StatusBar control. When user clicks on the ProgressBar property
it open a new editor window with ProgressBar property on the editor window
rather than having the drill down node right beside the Property. Just
curious to know how it works. Or is that only possible with collections.
 
that did work. thanks

Is there any way to make the ProgressBar property work similar to Panels
property of StatusBar control. When user clicks on the ProgressBar property
it open a new editor window with ProgressBar property on the editor window
rather than having the drill down node right beside the Property. Just
curious to know how it works. Or is that only possible with collections.
 
Back
Top