()
| 19 | } |
| 20 | |
| 21 | func (form *Form) UpdateLayout() { |
| 22 | form.ClientRect = form.BoundsRect |
| 23 | |
| 24 | form.ClientRect.Left = 1 |
| 25 | form.ClientRect.Top = 3 |
| 26 | form.ClientRect.Width -= 2 |
| 27 | form.ClientRect.Height -= 4 |
| 28 | |
| 29 | box := form.ClientRect |
| 30 | box.Height = 1 |
| 31 | for _, component := range form.Components { |
| 32 | component.Rect = box |
| 33 | box.Top += 1 |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | func (form *Form) Render() { |
| 38 | r := Rect{0, 0, form.BoundsRect.Width, form.BoundsRect.Height} |