如何将按钮保持在TableLayoutPanel下方的相同位置?

时间:2016-07-15 03:23:50

标签: c# winforms tablelayoutpanel

在C#中,如果调整Buttons的大小与TableLayoutPanel的距离相同,将Form置于Form以下相同距离的最佳方法是怎样的? TableLayoutPanel

这是一张图片:

enter image description here

AnchorTop, Bottom, Left, Right设置为Form Control

我应该使用特定的Form's,还是需要通过func ParsePGArray(array string) ([]string, error) { var out []string var arrayOpened,quoteOpened,escapeOpened bool item := &bytes.Buffer{} for _, r := range array { switch { case !arrayOpened: if r != '{' { return nil, errors.New("Doesn't appear to be a postgres array. Doesn't start with an opening curly brace.") } arrayOpened = true case escapeOpened: item.WriteRune(r) escapeOpened = false case quoteOpened: switch r { case '\\': escapeOpened = true case '"': quoteOpened = false if item.String() == "NULL" { item.Reset() } default: item.WriteRune(r) } case r == '}': // done out = append(out, item.String()) return out, nil case r == '"': quoteOpened = true case r == ',': // end of item out = append(out, item.String()) item.Reset() default: item.WriteRune(r) } } return nil, errors.New("Doesn't appear to be a postgres array. Premature end of string.") } resize事件中的代码来完成?

1 个答案:

答案 0 :(得分:0)

如果您的面板正在伸展(Anchor:Left, Right, Bottom, Top),那么您应该将按钮的锚点设置为Bottom, Right,这样它就会基本上与您调整表单的位置保持一致。