PropertyGrid sees only public properties
From: Koen (kp_at_remove-this.bvdep.com)
Date: 02/08/05
- Next message: Ryan Michela: "MSDN Exception Documentation"
- Previous message: Bonato Pierantonio: "DataAdapter & SQLClient"
- Next in thread: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: Wayne: "Re: PropertyGrid sees only public properties"
- Reply: Erik Molenaar: "Re: PropertyGrid sees only public properties"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Feb 2005 16:22:16 +0100
The things you can do with a propertygrid are fantastic. Howeveer all
properties you want to appear in the grid need to be public and all
properties that you want to be editable need to have a set accessor.
How can I make my class expose the properties differently for a PropertyGrid
than for normal use in the code?
Some more details: I want to use the propertygrid to edit resources. I
already have a class that can read/write these resources but I do not want
to change these resources at run-time, so I don't want a 'set' of the
properties to be publicly visible (malicious programmers are always around
to change some common resource). However a property grid is ideal to edit
the class and hence the resources I could do a run-time check in the set of
the property to see if the object is writable, but it is so much cleaner
that a call that will go through set is trapped by the compiler (like when
no set accessor exists) .
I also want to expose some properties in their full complexity while in
run-time they are simply exposed like strings. So the type of the property
would change between runtime and peropertygrid
Koen.
- Next message: Ryan Michela: "MSDN Exception Documentation"
- Previous message: Bonato Pierantonio: "DataAdapter & SQLClient"
- Next in thread: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: PIEBALD: "RE: PropertyGrid sees only public properties"
- Reply: Wayne: "Re: PropertyGrid sees only public properties"
- Reply: Erik Molenaar: "Re: PropertyGrid sees only public properties"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|