return any objects. The PropertyGrid will use reflection to find the
properties of that object and use them to populate the grid. you can set
attributes to specify the description, category and whether it should be
shown. Custom property editors however won't work 'out of the box'. you need
some additional code.
Bill
> I've found some of the answers out myself by now.
> Using the ITrackSelection.OnSelectChange() I can make the IDE ask for a
[quoted text clipped - 8 lines]
>
> Thanks.
Thank you for the reply,
unfortionatly the property grid shows nothing at all when I return an
object.
I have a class defined somthing like
public class Item
{
private string _Name = string.empty;
public string Name
{
get
{
return _Name;
}
set
{
_Name = vakue;
}
}
}
Then in ISelectionContainer.CountObjects(uint dwFlags, out uint pc) I set
pc = 1.
In ISelectionContainer.GetObjects(uint dwFlags, uint cObjects, object[]
apUnkObjects) I set apUnkObjects[0] = item where item is of type Item.
As I said, the property grid shows nothing, not even a name in the object
drop down.
I guess that the relfection mechanism only applies when a ComponentEditor-
derived editor is used. What the raw IDE uses seems to be an Acrtive-X
property page.
> return any objects. The PropertyGrid will use reflection to find the
> properties of that object and use them to populate the grid. you can set
[quoted text clipped - 18 lines]
> >
> > Thanks.
Munir Husseini - 09 Jul 2004 17:07 GMT
Ok, now I get it.
There seems to be a problem when using VSIP since the property grid is
managed code.
This link has the solution:
http://blogs.msdn.com/allend/archive/2004/04/09/110303.aspx
> Thank you for the reply,
>
[quoted text clipped - 54 lines]
> > >
> > > Thanks.