MCPcopy
hub / github.com/lxn/walk / Dispose

Method Dispose

tableview.go:338–372  ·  view source on GitHub ↗

Dispose releases the operating system resources, associated with the *TableView.

()

Source from the content-addressed store, hash-verified

336// Dispose releases the operating system resources, associated with the
337// *TableView.
338func (tv *TableView) Dispose() {
339 tv.columns.unsetColumnsTV()
340
341 tv.disposeImageListAndCaches()
342
343 if tv.hWnd != 0 {
344 if !win.KillTimer(tv.hWnd, tableViewCurrentIndexChangedTimerId) {
345 lastError("KillTimer")
346 }
347 if !win.KillTimer(tv.hWnd, tableViewSelectedIndexesChangedTimerId) {
348 lastError("KillTimer")
349 }
350 }
351
352 if tv.hwndFrozenLV != 0 {
353 tv.group.toolTip.removeTool(tv.hwndFrozenHdr)
354 win.DestroyWindow(tv.hwndFrozenLV)
355 tv.hwndFrozenLV = 0
356 }
357
358 if tv.hwndNormalLV != 0 {
359 tv.group.toolTip.removeTool(tv.hwndNormalHdr)
360 win.DestroyWindow(tv.hwndNormalLV)
361 tv.hwndNormalLV = 0
362 }
363
364 if tv.formActivatingHandle > -1 {
365 if form := tv.Form(); form != nil {
366 form.Activating().Detach(tv.formActivatingHandle)
367 }
368 tv.formActivatingHandle = -1
369 }
370
371 tv.WidgetBase.Dispose()
372}
373
374func (tv *TableView) applyEnabled(enabled bool) {
375 tv.WidgetBase.applyEnabled(enabled)

Callers 1

NewTableViewWithCfgFunction · 0.95

Calls 8

lastErrorFunction · 0.85
unsetColumnsTVMethod · 0.80
removeToolMethod · 0.80
FormMethod · 0.65
ActivatingMethod · 0.65
DisposeMethod · 0.65
DetachMethod · 0.45

Tested by

no test coverage detected