change the default UITypeEditor

  • Thread starter Thread starter margoulin
  • Start date Start date
M

margoulin

Hi,

I have a custom color selector control and a derived UITypeEditor allowing
me tu use my color picker in a property grid. But I have to specifically
call this editor for each property, like

[CategoryAttribute("General"),
EditorAttribute(typeof(kColorEd), typeof(UITypeEditor)),
TypeConverter(typeof(kColorConverter))]
public Color AColor { get{ return aColor; } set { aColor = value; } }

Is it possible to change the default UITypeEditor for a specific type (Color
in my case) at the app startup ?

Thx,

-Marc
 
Dnia 2003-11-14 12:25, U¿ytkownik margoulin napisa³:
Hi,

I have a custom color selector control and a derived UITypeEditor allowing
me tu use my color picker in a property grid. But I have to specifically
call this editor for each property, like

[CategoryAttribute("General"),
EditorAttribute(typeof(kColorEd), typeof(UITypeEditor)),
TypeConverter(typeof(kColorConverter))]
public Color AColor { get{ return aColor; } set { aColor = value; } }

Is it possible to change the default UITypeEditor for a specific type (Color
in my case) at the app startup ?

Thx,

-Marc
You should define your own PropertyDescriptor for your object.

Marcin
 
Back
Top