在C#中,如果调整Buttons
的大小与TableLayoutPanel
的距离相同,将Form
置于Form
以下相同距离的最佳方法是怎样的? TableLayoutPanel
?
这是一张图片:
Anchor
将Top, 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事件中的代码来完成?
答案 0 :(得分:0)
如果您的面板正在伸展(Anchor:Left, Right, Bottom, Top
),那么您应该将按钮的锚点设置为Bottom, Right
,这样它就会基本上与您调整表单的位置保持一致。