Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: Timer on a new thread Pin
S. Senthil Kumar20-Feb-05 13:20
S. Senthil Kumar20-Feb-05 13:20 
GeneralRe: Timer on a new thread Pin
eggie520-Feb-05 14:35
eggie520-Feb-05 14:35 
GeneralRe: Timer on a new thread Pin
eggie520-Feb-05 15:08
eggie520-Feb-05 15:08 
GeneralRe: Timer on a new thread Pin
S. Senthil Kumar20-Feb-05 15:33
S. Senthil Kumar20-Feb-05 15:33 
GeneralRe: Timer on a new thread Pin
eggie520-Feb-05 16:25
eggie520-Feb-05 16:25 
QuestionChecking the attributes of a directory? Pin
Marlun20-Feb-05 11:40
Marlun20-Feb-05 11:40 
QuestionHow to arrange attribute of PropertyGrid Pin
lee meng20-Feb-05 9:44
lee meng20-Feb-05 9:44 
AnswerRe: How to arrange attribute of PropertyGrid Pin
Mathew Hall20-Feb-05 13:47
Mathew Hall20-Feb-05 13:47 
You need to create a TypeConverter for your object and override the GetProperties() method

[TypeConverter(typeof(MyClassConverter))]<br />
public class MyClass <br />
{<br />
  ...<br />
}<br />
<br />
public class MyClassConverter : TypeConverter<br />
{<br />
  public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)<br />
  {<br />
    // set the order in which the properties appear <br />
    // in the property window<br />
			<br />
    PropertyDescriptorCollection collection = TypeDescriptor.GetProperties(typeof(MyClass), attributes);<br />
<br />
    string[] s = new string[3];<br />
    s[0] = "XYZPropertyName";<br />
    s[1] = "ABCPropertyName";<br />
    s[2] = "IJKPropertyName";<br />
<br />
    return collection.Sort(s);<br />
  }<br />
}


So when you look at the properties of MyClass in the property grid, they appear in the specified order

"I think I speak on behalf of everyone here when I say huh?" - Buffy
GeneralRe: How to arrange attribute of PropertyGrid Pin
lee meng21-Feb-05 6:41
lee meng21-Feb-05 6:41 
GeneralRe: How to arrange attribute of PropertyGrid Pin
Mathew Hall21-Feb-05 15:12
Mathew Hall21-Feb-05 15:12 
GeneralRe: How to arrange attribute of PropertyGrid Pin
lee meng22-Feb-05 2:14
lee meng22-Feb-05 2:14 
GeneralSocket polling Pin
Magnus2720-Feb-05 7:47
Magnus2720-Feb-05 7:47 
GeneralNET and DCOM Pin
vad_kr20-Feb-05 4:21
vad_kr20-Feb-05 4:21 
GeneralRe: NET and DCOM Pin
Rob Graham20-Feb-05 8:23
Rob Graham20-Feb-05 8:23 
GeneralRe: NET and DCOM Pin
vad_kr20-Feb-05 20:45
vad_kr20-Feb-05 20:45 
GeneralRe: NET and DCOM Pin
sokettepower20-Feb-05 23:40
sokettepower20-Feb-05 23:40 
GeneralBitWise operation Problem Pin
memoboy20-Feb-05 1:13
memoboy20-Feb-05 1:13 
GeneralRe: BitWise operation Problem Pin
leppie20-Feb-05 2:43
leppie20-Feb-05 2:43 
GeneralRe: BitWise operation Problem Pin
memoboy20-Feb-05 6:35
memoboy20-Feb-05 6:35 
GeneralRe: BitWise operation Problem Pin
leppie20-Feb-05 6:46
leppie20-Feb-05 6:46 
QuestionHow To Get Form Instance of Requesting WebForm in Global.asax.cs Pin
Rajesh Thomas20-Feb-05 1:02
Rajesh Thomas20-Feb-05 1:02 
GeneralHelp with figuring out enums Pin
meepymoo20-Feb-05 0:37
meepymoo20-Feb-05 0:37 
GeneralRe: Help with figuring out enums Pin
mav.northwind20-Feb-05 1:16
mav.northwind20-Feb-05 1:16 
GeneralRe: Help with figuring out enums Pin
meepymoo20-Feb-05 2:01
meepymoo20-Feb-05 2:01 
GeneralRe: Help with figuring out enums Pin
leppie20-Feb-05 2:47
leppie20-Feb-05 2:47 

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.