473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

change the default UITypeEditor

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
Nov 15 '05 #1
1 3357
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

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mevar81 | last post by:
Hello to everybody.I make a class that inherits from UITypeEditor to customizing the view of the value of an image in a PropertyGrid.I have a problem when I want to cancel the image selected...
1
by: Ernest Morariu | last post by:
Hi All! The MyEditor class derives from UITypeEditor and its constructor has some parameters. I have to use EditorAttribute to associate MyEditor with a type or property. Question: it would...
1
by: Julia | last post by:
Hi, Which is the default UITypeEditor for Point in PropertyGrid? Should i write my own UITypeEditor? Thanks in advance
2
by: Ahmed Hashish | last post by:
In building controls we need to create Custom UITypeEditor classes, most of this classes (in my case) doing the same job, its used to support the controls properties with a drop down list contains...
13
by: alex sparsky | last post by:
I have a custom collection in my c# winform ui control called Items. Items is a built in collection type that does not allow itself to be replace (you can't 'set' the itemscollection in the...
0
by: pedery | last post by:
I have created an image selection dropdown editor for use in a PropertyGrid. My selector form is called dropdown by a IWindowsFormsEditorService and so far it's all sweet. On my selector form I...
2
by: Marc Gravell | last post by:
::: Question: Does anyone know of a simple Control / UserControl implementation that hosts a UITypeEditor? Or the correct way to call PropertyDescriptor.GetEditor() and get a non-null result for...
4
by: ge0193387 | last post by:
I'm dynamically adding controls to a custom control based on the data type of the property being used. So if the property is a string the control will be a groupbox containing a textbox for...
7
by: colin | last post by:
Hi, I have my property editor wich uses the pop up collection editor for arrays etc, but i have had to use a generic wrapper for the elements in some types of collections. although the editing...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.