PC Review


Reply
Thread Tools Rate Thread

Custom Control Graphic

 
 
Derek Hart
Guest
Posts: n/a
 
      4th Mar 2009
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






 
Reply With Quote
 
 
 
 
hack2root@gmail.com
Guest
Posts: n/a
 
      19th Mar 2009
On Mar 4, 9:42*pm, "Derek Hart" <derekmh...@yahoo.com> 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
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a custom graphic for linkbars =?Utf-8?B?QWlyYnJvbjM4?= Microsoft Frontpage 1 27th Mar 2006 11:02 AM
Better Graphic identification of custom animation items =?Utf-8?B?RWRkaWVH?= Microsoft Powerpoint 0 27th Jan 2006 04:00 PM
Capturing event from other custom control within another custom control Jonah Olsson Microsoft ASP .NET 1 5th Apr 2005 02:39 PM
Embed Graphic onto custom command John Hughes Microsoft Excel Programming 2 6th Apr 2004 04:25 PM
Using Table control in a custom composite control. Control does not render properly in design time. jb_in_marietta@yahoo.com Microsoft ASP .NET 0 1st Jul 2003 10:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:55 AM.