sjn78 Posted March 1, 2004 Posted March 1, 2004 I am making a control and have a couple of different options for it in the properties. This all works, but I am trying to find out how to make a certain option appear under a certain tab, eg Appearance, Bahaviour etc. I can only seem to get it to appear in the Misc tab. Thanks Steve Quote
Hamburger1984 Posted March 1, 2004 Posted March 1, 2004 try this: using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; public class MyUserControl:Control { [b][Category("Appearance")][/b] public Color myColorProperty { get{return base.ForeColor;} set{base.ForeColor = value;} } } Imports System Imports System.ComponentModel Imports System.Drawing Imports System.Windows.Forms Public Class MyUserConrol Inherits Control [b]<Category("Appearance")> _[/b] Public Property myColorProperty() As Color Get Return MyBase.ForeColor End Get Set(ByVal Value As Color) MyBase.ForeColor = Value End Set End Property End Class Hope this helps! Andreas Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.