Home All Groups Group Topic Archive Search About

How do I prevent the Form Designer from modifying controls in a container?

Author
15 Apr 2005 3:53 PM
Don
I have a custom control that inherits the Panel control.  Within the custom
control I add Button controls to the Me.Controls collection via code.
Controls added to my custom panel in this way can be selected in the Form
Designer and dragged out of the custom panel control.  Is there a way to
prevent the user from doing this?  (Think the buttons in a toolbar control
and how they cannot be selected at design time)

- Don

Author
15 Apr 2005 5:49 PM
Chris Dunaway
You could try setting their locked property to True
Author
15 Apr 2005 6:08 PM
Don
That doesn't appear possible to do in code.  Do you know of a way that this
can be done?


Show quoteHide quote
"Chris Dunaway" <dunaw***@gmail.com> wrote in message
news:1113587365.965945.76890@z14g2000cwz.googlegroups.com...
> You could try setting their locked property to True
>