Custom Control Graphic

Discussion in 'Microsoft Dot NET Framework Forms' started by Derek Hart, Mar 4, 2009.

  1. Derek Hart

    Derek Hart Guest

    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
     
    Derek Hart, Mar 4, 2009
    #1
    1. Advertisements

  2. Derek Hart

    Guest

    On Mar 4, 9:42 pm, "Derek Hart" <> wrote:
    > 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
     
    , Mar 19, 2009
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert C. Nell

    Can't move nested control in custom container control

    Robert C. Nell, Oct 11, 2003, in forum: Microsoft Dot NET Framework Forms
    Replies:
    2
    Views:
    287
    Robert C. Nell
    Oct 11, 2003
  2. Guest

    Control.DesignMode and OnPaint in Custom Control

    Guest, Mar 20, 2004, in forum: Microsoft Dot NET Framework Forms
    Replies:
    2
    Views:
    1,531
    Guest
    Mar 24, 2004
  3. malcolm
    Replies:
    0
    Views:
    492
    malcolm
    Jun 10, 2004
  4. Supra

    graphic window checker baord game....

    Supra, Jun 12, 2004, in forum: Microsoft Dot NET Framework Forms
    Replies:
    0
    Views:
    188
    Supra
    Jun 12, 2004
  5. Rhy Mednick

    Control designer for custom user control property

    Rhy Mednick, Jun 17, 2004, in forum: Microsoft Dot NET Framework Forms
    Replies:
    1
    Views:
    498
    Ernest Morariu
    Jun 18, 2004
Loading...

Share This Page