Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to select another form, for custom actions and I wanna do it in the design-time propertygrid. I've seen SelectedObject property in .NET PropertyGridControl and it shows a controls list from current form. Is it possible to do it with an inherited form property?
Posted
Comments
Sergey Alexandrovich Kryukov 19-Sep-14 15:30pm    
Do you mean System.Windows.Forms.PropertyGrid?
The rest of the question is not clear. Possible to do — what? What form property do you mean? Why do you think "inherited" may make any difference? It only depends on access modifier.
—SA
pedritin91 19-Sep-14 16:31pm    
Sorry if you can't understand me, i'm cuban and I mean visual studio's controls propertygrid in design-time. I've seen something about ReferenceConverter for this situations, is what I think. What I want is when I edit that propertygrid field, I wanna get all forms in that assembly even if the inherited form* of the property in question.

*Assuming that it is a inherited form
Sergey Alexandrovich Kryukov 19-Sep-14 16:43pm    
Your English is clear enough; I would not worry much about it at the moment. Just answer my questions. Is it System.Windows.Forms.PropertyGrid? Do you mean TypeConverted.
You need to produce some minimal but comprehensive code sample, explain what works with it and what not, write down some sample of the text in the control you want to achieve, with the sample of the object presented as SelectedObject.
—SA
pedritin91 26-Sep-14 14:09pm    
No, I mean visual studio PropertyGrid. I've seen the .NET Solution "ndp"(http://referencesource.microsoft.com) 'cause I've seen the AttributeProvider(IlistSource) behavior when design-time it drops a selection-control for DataSource Object in the current project. Later then I saw the System.Windows.Form.PropertyGrid.SelectedObject editing-mode and I saw that all visual controls can be selected ( of course, one by one). So i want to do something like this behavior.
Sergey Alexandrovich Kryukov 26-Sep-14 15:07pm    
All right, but did you know that grid is (to best of my knowledge) actually System.Windows.Forms.PropertyGrid? At least, it behaves exactly as the one, and all techniques applicable to

Please see my article Bitwise Enumeration Editor for PropertyGrid and Visual Studio, to understand just the basic idea (forget about enumerations of that is not your concern).

As to your particular problem, I think we can only continue this discussion if you provide some really short code sample to at least illustrate it. In brief, I don't see how a difference between inherited or new member can possibly make any difference.

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900