Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: Treeview embedded in a listview Pin
Furty12-Aug-03 22:02
Furty12-Aug-03 22:02 
QuestionWho knows what I need to install in the client system to run a C# application? Pin
yboc12-Aug-03 18:22
yboc12-Aug-03 18:22 
AnswerRe: Who knows what I need to install in the client system to run a C# application? Pin
Furty12-Aug-03 22:11
Furty12-Aug-03 22:11 
GeneralRe: Who knows what I need to install in the client system to run a C# application? Pin
yboc13-Aug-03 17:14
yboc13-Aug-03 17:14 
QuestionHow to have sub-properties in a custom control? Pin
Alvaro Mendez12-Aug-03 16:09
Alvaro Mendez12-Aug-03 16:09 
AnswerRe: How to have sub-properties in a custom control? Pin
J. Dunlap12-Aug-03 16:43
J. Dunlap12-Aug-03 16:43 
GeneralRe: How to have sub-properties in a custom control? Pin
Alvaro Mendez13-Aug-03 5:15
Alvaro Mendez13-Aug-03 5:15 
AnswerRe: How to have sub-properties in a custom control? Pin
Nick Parker12-Aug-03 18:27
protectorNick Parker12-Aug-03 18:27 
Alvaro Mendez wrote:
I'm now creating a custom control myself for which I want add a property with sub-properties. How is that done? Is there an example I can look at somewhere?

I really appreciate your help,


This is done with attributes, here is an example where using the same Category attribute's name will cause the Color property and the String property to be grouped under Options (note each property has it's own Description). Hope this helps.


internal class Properties
{	
        [Category("Options"),
	Description("The color of the header on main form at top.")]
	public Color Color
	{
	        get{return _color;}
	        set{_color = value;}
	}
	[Category("Options"),
         Description("Some string used in the app.")]]
	public String String
	{
		get{return _s;}
		set{_s = value;}
	}
	private Color _color;
	private String _s;
}


-Nick Parker
GeneralRe: How to have sub-properties in a custom control? Pin
Meysam Mahfouzi12-Aug-03 19:49
Meysam Mahfouzi12-Aug-03 19:49 
GeneralRe: How to have sub-properties in a custom control? Pin
Nick Parker13-Aug-03 1:45
protectorNick Parker13-Aug-03 1:45 
GeneralRe: How to have sub-properties in a custom control? Pin
Arjan Einbu13-Aug-03 5:11
Arjan Einbu13-Aug-03 5:11 
GeneralRe: How to have sub-properties in a custom control? Pin
Nick Parker13-Aug-03 5:33
protectorNick Parker13-Aug-03 5:33 
GeneralRe: How to have sub-properties in a custom control? Pin
Alvaro Mendez13-Aug-03 5:23
Alvaro Mendez13-Aug-03 5:23 
GeneralRe: How to have sub-properties in a custom control? Pin
Nick Parker13-Aug-03 5:35
protectorNick Parker13-Aug-03 5:35 
GeneralRe: How to have sub-properties in a custom control? Pin
Meysam Mahfouzi13-Aug-03 17:46
Meysam Mahfouzi13-Aug-03 17:46 
GeneralRe: How to have sub-properties in a custom control? Pin
Nick Parker14-Aug-03 2:08
protectorNick Parker14-Aug-03 2:08 
GeneralRe: How to have sub-properties in a custom control? Pin
Alvaro Mendez13-Aug-03 5:32
Alvaro Mendez13-Aug-03 5:32 
AnswerRe: How to have sub-properties in a custom control? Pin
Nnamdi Onyeyiri13-Aug-03 0:52
Nnamdi Onyeyiri13-Aug-03 0:52 
GeneralRe: How to have sub-properties in a custom control? Pin
Alvaro Mendez13-Aug-03 5:26
Alvaro Mendez13-Aug-03 5:26 
AnswerSolution! Pin
Alvaro Mendez13-Aug-03 5:08
Alvaro Mendez13-Aug-03 5:08 
Generaladding sub items Microsoft example doesnt work Pin
Ista12-Aug-03 11:58
Ista12-Aug-03 11:58 
GeneralRe: adding sub items Microsoft example doesnt work Pin
Csharp™12-Aug-03 15:08
Csharp™12-Aug-03 15:08 
GeneralRe: adding sub items Microsoft example doesnt work Pin
Ista12-Aug-03 15:45
Ista12-Aug-03 15:45 
Generaldatagrid column widths Pin
mikemilano12-Aug-03 10:57
mikemilano12-Aug-03 10:57 
GeneralRe: datagrid column widths Pin
Ista12-Aug-03 11:56
Ista12-Aug-03 11:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.