Start New Discussion within our Software Development Community

I want to make a combobox that will grow or shrink according to the screen size any help?

Hi Isaac, you can grow or shrink any .NET control by setting it's hight or width to whichever size using the [Control].Hight and [Control].Width....

Normally, I use the parent control of my control as a base for my resizing.
i.e If you had an outter control which uses docking and you had set your resize mode to Font (default) or DPI (screen resolution) then you easily subcribe to the Resize event then re-compute your new size as e.g Control.Width = ParentControl.Width-[Prefered padding size].

Hope you find this useful

The easier solution would be to set the control's anchors in the desinger.

This will cut down on code.

Unles, of course, you are creating these controls on runtime.

This article has been dead for over six months. Start a new discussion instead.