Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a subclassed listbox.

Aside from setting it's properties in the constructor is there a way to "lock" its properties so the subclassed control doesn't even expose them?
Posted

1 solution

One way to do this is to use the IDesigner.PreFilterProperties()[^] method.

This will not hide all properties, for example (from memory) it will not hide the Name property, although it works for most.

For an example of it's use take a look at the last code snippet in this article[^] of mine. There are also some links at the bottom that may (or may not :) ) be useful to you.
 
Share this answer
 

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