tags:

views:

59

answers:

2

I have a custom control based on the label control. My question is how do I change the selection box size around this custom control when a user selects it while in design mode. The need is the box is too large I need to make it smaller.

Also AutoSize set to true will not work in my case, the selection box is still too big.

A: 

The selection box in the designer is (and must be) dependent upon the size of your control. If you want to make it smaller, your control must be smaller. There is no way to control its size or position manually.

Adam Robinson
The AutoSize property seems to control it some how, this is odd it can't be changed. hum.. how about turning it off, maybe use the a text color change to indicate the user has selected the control.
AClark
@AClark: `AutoSize` controls the size of your control, which is why it controls the size of the selection box.
Adam Robinson
A: 

You would have to create a designer based on ControlDesigner for your control then use the DrawFocusRectangle method in the OnPaintAdornments event.

AMissico
Thanks AMissico, very good links, thanks for the info.
AClark