Click here to Skip to main content
15,903,362 members
Home / Discussions / C#
   

C#

 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
Roger Wright28-Oct-11 4:38
professionalRoger Wright28-Oct-11 4:38 
AnswerRe: Where Did Microsoft.CSharp Go? Pin
PIEBALDconsult28-Oct-11 2:58
mvePIEBALDconsult28-Oct-11 2:58 
QuestionA bit of help with process.getprocesses Pin
CCodeNewbie27-Oct-11 8:37
CCodeNewbie27-Oct-11 8:37 
AnswerRe: A bit of help with process.getprocesses Pin
Wayne Gaylard27-Oct-11 9:01
professionalWayne Gaylard27-Oct-11 9:01 
GeneralRe: A bit of help with process.getprocesses Pin
CCodeNewbie27-Oct-11 10:16
CCodeNewbie27-Oct-11 10:16 
AnswerRe: A bit of help with process.getprocesses Pin
Mark Salsbery27-Oct-11 9:04
Mark Salsbery27-Oct-11 9:04 
QuestionHow to simulate in C#, a VB6 Activex EXE Standalone application which exposes a com visible object . Pin
SuperMiQi27-Oct-11 7:38
SuperMiQi27-Oct-11 7:38 
QuestionCustom Editor for TabPages in PropertyGrid Pin
Bernhard Hiller27-Oct-11 2:57
Bernhard Hiller27-Oct-11 2:57 
A PropertyGrid is a nice component fpr editing properties. When it comes to collections, there is the problem that an extra editor is opened, and that extra editor lacks a Closed event.
An article here on CodeProject (PropertyGrid Collection Events[^]) shows how to create a custom editor.
On StackOverflow, I found how to inject a Custom UI Editor (http://stackoverflow.com/questions/849202/how-do-i-inject-a-custom-uitypeeditor-for-all-properties-of-a-closed-source-type[^]).
And there is an editor for TabPages in Syste.Windows.Forms.Design - but that cannot be accessed for inheriting from. I found the code of that editor (http://reflector.webtropy.com/default.aspx/DotNET/DotNET/8@0/untmp/whidbey/REDBITS/ndp/fx/src/Designer/WinForms/System/WinForms/Design/tabpagecollectioneditor@cs/1/tabpagecollectioneditor@cs[^]) and added a closed event as shown in the first link.
Now when I do
C#
object editor0 = System.ComponentModel.TypeDescriptor.GetEditor(typeof(TabControl.TabPageCollection), typeof(System.Drawing.Design.UITypeEditor));
System.ComponentModel.TypeDescriptor.AddAttributes(typeof(TabControl.TabPageCollection),
    new System.ComponentModel.EditorAttribute(typeof(MyTabPageCollectionEditor), typeof(System.Drawing.Design.UITypeEditor)));
object editor1 = System.ComponentModel.TypeDescriptor.GetEditor(typeof(TabControl.TabPageCollection), typeof(System.Drawing.Design.UITypeEditor));

editor0 is a System.ComponentModel.Design.CollectionEditor, editor1 is a MyTabPageCollectionEditor, exactly as expected.
But when I set
C#
propertyGrid.SelectedObject = _TabControl;

my editor is not used for the TabPages property.
Is there a step I missed?
AnswerRe: Custom Editor for TabPages in PropertyGrid Pin
Bernhard Hiller27-Oct-11 21:34
Bernhard Hiller27-Oct-11 21:34 
QuestionRemove Enum prefix from tlb Pin
liqnit27-Oct-11 0:29
liqnit27-Oct-11 0:29 
AnswerRe: Remove Enum prefix from tlb Pin
Pete O'Hanlon27-Oct-11 1:25
mvePete O'Hanlon27-Oct-11 1:25 
GeneralRe: Remove Enum prefix from tlb Pin
liqnit27-Oct-11 2:40
liqnit27-Oct-11 2:40 
GeneralRe: Remove Enum prefix from tlb Pin
Pete O'Hanlon27-Oct-11 3:10
mvePete O'Hanlon27-Oct-11 3:10 
GeneralRe: Remove Enum prefix from tlb Pin
Dave Kreskowiak27-Oct-11 3:48
mveDave Kreskowiak27-Oct-11 3:48 
GeneralRe: Remove Enum prefix from tlb Pin
liqnit29-Oct-11 21:05
liqnit29-Oct-11 21:05 
QuestionUpdating an access database table using C# Pin
Theresho26-Oct-11 23:47
Theresho26-Oct-11 23:47 
AnswerRe: Updating an access database table using C# Pin
Richard MacCutchan27-Oct-11 0:32
mveRichard MacCutchan27-Oct-11 0:32 
AnswerRe: Updating an access database table using C# Pin
BobJanova27-Oct-11 3:05
BobJanova27-Oct-11 3:05 
AnswerRe: Updating an access database table using C# Pin
jschell27-Oct-11 8:35
jschell27-Oct-11 8:35 
Question"Linked open data" in C# ASP.Net Pin
shanNSK26-Oct-11 20:49
shanNSK26-Oct-11 20:49 
AnswerRe: How to Convert URL to URI in rdf format? Pin
OriginalGriff26-Oct-11 22:00
mveOriginalGriff26-Oct-11 22:00 
QuestionC# access setting file Pin
sc steinhayse26-Oct-11 5:46
sc steinhayse26-Oct-11 5:46 
AnswerRe: C# access setting file Pin
Richard MacCutchan26-Oct-11 6:23
mveRichard MacCutchan26-Oct-11 6:23 
QuestionPreferred style Pin
Reiss26-Oct-11 5:24
professionalReiss26-Oct-11 5:24 
GeneralRe: Preferred style Pin
harold aptroot26-Oct-11 5:37
harold aptroot26-Oct-11 5:37 

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.