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

Method SetBackground

treeview.go:108–124  ·  view source on GitHub ↗
(bg Brush)

Source from the content-addressed store, hash-verified

106}
107
108func (tv *TreeView) SetBackground(bg Brush) {
109 tv.WidgetBase.SetBackground(bg)
110
111 color := Color(win.GetSysColor(win.COLOR_WINDOW))
112
113 if bg != nil {
114 type Colorer interface {
115 Color() Color
116 }
117
118 if c, ok := bg.(Colorer); ok {
119 color = c.Color()
120 }
121 }
122
123 tv.SendMessage(win.TVM_SETBKCOLOR, 0, uintptr(color))
124}
125
126func (tv *TreeView) Model() TreeModel {
127 return tv.model

Callers

nothing calls this directly

Calls 4

ColorTypeAlias · 0.85
SetBackgroundMethod · 0.65
ColorMethod · 0.65
SendMessageMethod · 0.65

Tested by

no test coverage detected