Need PropertyGrid Help

  • Thread starter Thread starter crow_y2k
  • Start date Start date
C

crow_y2k

Hellooo out there...

i have a problem with my propertygrid ( who dont have such a problem
;-) ):

i want to programm a small app to easy edit a .ini file. i thought that
a property grid would be a nice solution for that.

so i load the file structure ( CIniFile, CIniSection, CIniOption ) and
bind the CIniFile to the PropertyGrid. So far so good. Now i want to
display the CIniSection(s) as a Category entry an not as a Property
entry... and thats what i dont get run.

i read some articles how to format the shown properties and to add
properties at run-time or add own controls to edit properties... but i
cant find a solution to add CATEGORIES at runtime.

Would anybody know a way out?
 
The only way I can think of to do this would be to implement
ICustomTypeDescriptor, and when your properties are asked for, you apply the
appropriate Category attribute to the property according to the CIniSection
instances that you have.

Hope this helps.
 
thanks for the first message!
I also found the ICustomTypeDescriptor but i cant write to the Category
Property. Looks like it's readonly. -> Shi***
 
Back
Top