Custom Control Graphic

D

Derek Hart

I tried to take control of the main windows label in a custom usercontrol.
In the toolbox the control no longer has the graphic for a Label, but has a
generic graphic. Is there a way to have it have the same Label in the
toolbox in Visual Studio?



Public Class MyLabel

Inherits System.Windows.Forms.Label

<Browsable(False)> _

Public Shadows ReadOnly Property TabIndex() As Integer

' So it will not show up when doing tab ordering.

Get

Return MyBase.TabIndex

End Get

End Property

End Class
 
H

hack2root

I tried to take control of the main windows label in a custom usercontrol..
In the toolbox the control no longer has the graphic for a Label, but hasa
generic graphic. Is there a way to have it have the same Label in the
toolbox in Visual Studio?

    Public Class MyLabel

        Inherits System.Windows.Forms.Label

        <Browsable(False)> _

        Public Shadows ReadOnly Property TabIndex() As Integer

            ' So it will not show up when doing tab ordering.

            Get

                Return MyBase.TabIndex

            End Get

        End Property

    End Class

Use [ToolboxBitmap] Attribute
 

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