Form returns the Form of the Window.
()
| 1280 | |
| 1281 | // Form returns the Form of the Window. |
| 1282 | func (wb *WindowBase) Form() Form { |
| 1283 | if wb.form == nil { |
| 1284 | if form, ok := wb.window.(Form); ok { |
| 1285 | wb.form = form |
| 1286 | } else { |
| 1287 | wb.form = ancestor(wb.window.(Widget)) |
| 1288 | } |
| 1289 | } |
| 1290 | |
| 1291 | return wb.form |
| 1292 | } |
| 1293 | |
| 1294 | func forEachDescendant(hwnd win.HWND, lParam uintptr) uintptr { |
| 1295 | if window := windowFromHandle(hwnd); window == nil || forEachDescendantCallback(window.(Widget)) { |