1.11M Members

ComboBox Grow / Shrink

 
0
 

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

 
0
 

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

 
0
 

Thanks a lot.

 
0
 

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.

 
0
 

During runtime when user maximses

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article