VS2005 bug? - textbox locked property

G

Guest

In my application I am creating frames that contain controls programmatically.
I am wanting to set the locked property of these controls programatically to
prevent resizing but can not find how to do this. Any suggestions please?

Furthermore, in trying to find out how this is done at design time I found
that the locked property of a control can be set but not saved, so that on
subsequent visits to the control the locked property is reset to false. I
noticed also that the locked property is not coded in the InitializeComponent
subroutine of the designer but appears to be stored in the .resx file. Does
this mean that this property is not meant to be modified programmatically at
runtime or am I missing something?
I dont think this propblem is specific to this individual control either.
Any help appreciated.

Thanks
 
P

Peter Foot [MVP]

The Locked property is specific to the designer and doesn't affect the
runtime behaviour of the control. If you don't want the control to be
automatically resized then don't use the docking/anchoring and write your
own custom resize logic instead.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top