Click here to Skip to main content
15,920,576 members
Home / Discussions / C#
   

C#

 
Generalneed to convert double to string in fraction format and vise versa Pin
Member 65483313-May-04 17:26
Member 65483313-May-04 17:26 
GeneralRe: need to convert double to string in fraction format and vise versa Pin
Heath Stewart13-May-04 17:47
protectorHeath Stewart13-May-04 17:47 
GeneralSource Column in DTS (OnErrorEvent) Pin
KSEI13-May-04 16:45
KSEI13-May-04 16:45 
GeneralRe: Source Column in DTS (OnErrorEvent) Pin
Heath Stewart13-May-04 17:07
protectorHeath Stewart13-May-04 17:07 
GeneralRe: Source Column in DTS (OnErrorEvent) Pin
KSEI13-May-04 21:01
KSEI13-May-04 21:01 
GeneralRe: Source Column in DTS (OnErrorEvent) Pin
Heath Stewart14-May-04 2:23
protectorHeath Stewart14-May-04 2:23 
GeneralPropertyGrid ...Comments plz. Pin
Jay Shankar13-May-04 15:44
Jay Shankar13-May-04 15:44 
GeneralRe: PropertyGrid ...Comments plz. Pin
Heath Stewart13-May-04 17:05
protectorHeath Stewart13-May-04 17:05 
A UITypeEditor won't allow you to place controls in the value region of the PropertyGrid in the .NET FCL, but it can display a popup window (like for the Control.Dock property) using the IWindowsFormsEditorService.

The important thing is to read the .NET Framework SDK for the System.ComponentModel namespace, and remember that it doesn't matter what language you write this in. All languages targeting the CLR compile to IL, so you can write this in C# and use it for VB.NET, Perl.NET, and many others.

For example, to get the collection of properties, you'd call TypeDescriptor.GetProperties. This even allows you to filter the properties with an array of attributes. You could, for example, pass an instance of the BrowsableAttribute(false) as one of the elements in the Attribute[] array so that non-browsable properties are not displayed (default behavior).

The .NET component model provides pretty much all the services you need. You should also implement certain services like the IWindowsFormsEditorService and other services that support UITypeEditors.

You should also examine how the System.Windows.Forms.PropertyGrid currently works either by using ildasm.exe (the IL Disassembler, part of the .NET Framework SDK, if you know how to read IL), or a decent decompiler like .NET Reflector[^].

You might also consider comprimising on a few things, like being able to host a control inside the PropertyGrid itself. Once you dig into the managed implementation for the PropertyGrid, you'll find it's not so easy doing the correct way (using the component model, which is still the easiest way).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: PropertyGrid ...Comments plz. Pin
Jay Shankar13-May-04 20:42
Jay Shankar13-May-04 20:42 
GeneralRe: PropertyGrid ...Comments plz. Pin
leppie14-May-04 7:26
leppie14-May-04 7:26 
GeneralProgress Bar Pin
The_Soul_Of_Rock13-May-04 15:18
The_Soul_Of_Rock13-May-04 15:18 
GeneralRe: Progress Bar Pin
Heath Stewart13-May-04 16:56
protectorHeath Stewart13-May-04 16:56 
GeneralRe: Progress Bar Pin
The_Soul_Of_Rock13-May-04 17:18
The_Soul_Of_Rock13-May-04 17:18 
GeneralRe: Progress Bar Pin
Heath Stewart13-May-04 17:21
protectorHeath Stewart13-May-04 17:21 
GeneralRe: Progress Bar Pin
The_Soul_Of_Rock13-May-04 17:44
The_Soul_Of_Rock13-May-04 17:44 
GeneralRe: Progress Bar Pin
LongRange.Shooter14-May-04 8:25
LongRange.Shooter14-May-04 8:25 
GeneralExplanation about Properties Pin
Rostrox13-May-04 13:04
Rostrox13-May-04 13:04 
GeneralRe: Explanation about Properties Pin
Heath Stewart13-May-04 13:20
protectorHeath Stewart13-May-04 13:20 
GeneralRe: Explanation about Properties Pin
pgraeve13-May-04 15:11
pgraeve13-May-04 15:11 
GeneralRe: Explanation about Properties Pin
Heath Stewart13-May-04 16:52
protectorHeath Stewart13-May-04 16:52 
GeneralAdding Rows to Dataset Pin
MrJJKoolJ13-May-04 12:37
MrJJKoolJ13-May-04 12:37 
GeneralRe: Adding Rows to Dataset Pin
MrJJKoolJ13-May-04 12:59
MrJJKoolJ13-May-04 12:59 
GeneralRe: Adding Rows to Dataset Pin
Heath Stewart13-May-04 13:04
protectorHeath Stewart13-May-04 13:04 
GeneralRe: Adding Rows to Dataset Pin
MrJJKoolJ13-May-04 13:22
MrJJKoolJ13-May-04 13:22 
GeneralRe: Adding Rows to Dataset Pin
Heath Stewart13-May-04 13:29
protectorHeath Stewart13-May-04 13:29 

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.