MCPcopy Index your code
hub / github.com/lxn/walk / SetFormat

Method SetFormat

tableviewcolumn.go:95–114  ·  view source on GitHub ↗

SetFormat sets the format string for converting a value into a string.

(format string)

Source from the content-addressed store, hash-verified

93
94// SetFormat sets the format string for converting a value into a string.
95func (tvc *TableViewColumn) SetFormat(format string) (err error) {
96 if format == tvc.format {
97 return nil
98 }
99
100 old := tvc.format
101 defer func() {
102 if err != nil {
103 tvc.format = old
104 }
105 }()
106
107 tvc.format = format
108
109 if tvc.tv == nil {
110 return nil
111 }
112
113 return tvc.tv.Invalidate()
114}
115
116// Name returns the name of this TableViewColumn.
117func (tvc *TableViewColumn) Name() string {

Callers 1

CreateMethod · 0.95

Calls 1

InvalidateMethod · 0.65

Tested by

no test coverage detected