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

Method SetTitleOverride

tableviewcolumn.go:186–201  ·  view source on GitHub ↗

SetTitleOverride sets the (overridden by user) text to display in the column header.

(titleOverride string)

Source from the content-addressed store, hash-verified

184// SetTitleOverride sets the (overridden by user) text to display in the column
185// header.
186func (tvc *TableViewColumn) SetTitleOverride(titleOverride string) (err error) {
187 if titleOverride == tvc.titleOverride {
188 return nil
189 }
190
191 old := tvc.titleOverride
192 defer func() {
193 if err != nil {
194 tvc.titleOverride = old
195 }
196 }()
197
198 tvc.titleOverride = titleOverride
199
200 return tvc.update()
201}
202
203// TitleEffective returns the effective text to display in the column header.
204func (tvc *TableViewColumn) TitleEffective() string {

Callers 1

RestoreStateMethod · 0.80

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected