(bg Brush)
| 106 | } |
| 107 | |
| 108 | func (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 | |
| 126 | func (tv *TreeView) Model() TreeModel { |
| 127 | return tv.model |
nothing calls this directly
no test coverage detected