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:
    350
    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,791
    Guest
    Mar 24, 2004
  3. malcolm
    Replies:
    0
    Views:
    577
    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:
    207
    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:
    562
    Ernest Morariu
    Jun 18, 2004
  6. metalseb

    Overriding graphic aspect of treeview checkbox

    metalseb, Sep 21, 2004, in forum: Microsoft Dot NET Framework Forms
    Replies:
    1
    Views:
    296
    Claes Bergefall
    Sep 22, 2004
  7. Guest

    Proper graphic coordinates

    Guest, Nov 17, 2004, in forum: Microsoft Dot NET Framework Forms
    Replies:
    2
    Views:
    241
    Guest
    Nov 17, 2004
  8. Lee Gillie

    How? Using a custom TypeConverter in custom grid column style.

    Lee Gillie, Jun 16, 2005, in forum: Microsoft Dot NET Framework Forms
    Replies:
    1
    Views:
    386
    Dmytro Lapshyn [MVP]
    Jun 17, 2005
Loading...