SetBoundsPixels sets the outer bounding box rectangle of the *WindowBase, including decorations. For a Form, like *MainWindow or *Dialog, the rectangle is in screen coordinates, for a child Window the coordinates are relative to its parent.
(bounds Rectangle)
| 1430 | // For a Form, like *MainWindow or *Dialog, the rectangle is in screen |
| 1431 | // coordinates, for a child Window the coordinates are relative to its parent. |
| 1432 | func (wb *WindowBase) SetBoundsPixels(bounds Rectangle) error { |
| 1433 | if !win.MoveWindow( |
| 1434 | wb.hWnd, |
| 1435 | int32(bounds.X), |
| 1436 | int32(bounds.Y), |
| 1437 | int32(bounds.Width), |
| 1438 | int32(bounds.Height), |
| 1439 | true) { |
| 1440 | |
| 1441 | return lastError("MoveWindow") |
| 1442 | } |
| 1443 | |
| 1444 | return nil |
| 1445 | } |
| 1446 | |
| 1447 | // MinSize returns the minimum allowed outer size for the *WindowBase, including |
| 1448 | // decorations. |
no test coverage detected