开发者

Winform group box is eating my button

I have a WinForms group box that needs to be sized programmatically.

Everything else is working well but I am having trouble with the below line of code because as the form is re-sized larger the group box grows over the buttons that are underneath.

I am looking for a way in code so that the group box grows with the form, but no so l开发者_JAVA百科arge that it grows over the button underneath it.

Const VerticalBuffer As Integer = 10
GroupBox1.Height = ((Me.Height - (3 * VerticalBuffer + 420)) * 0.33)


Does Anchoring help ? Try setting anchor on the buttons to bottom-right, when form resizes it will follow beneath; but for GroupBox anchor should work too, I think if you set the anchors on group box and resize it, the form should grow.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜