MCPcopy Create free account
hub / github.com/lxn/walk / itemString

Method itemString

listbox.go:191–205  ·  view source on GitHub ↗
(index int)

Source from the content-addressed store, hash-verified

189}
190
191func (lb *ListBox) itemString(index int) string {
192 switch val := lb.model.Value(index).(type) {
193 case string:
194 return val
195
196 case time.Time:
197 return val.Format(lb.format)
198
199 case *big.Rat:
200 return val.FloatString(lb.precision)
201
202 default:
203 return fmt.Sprintf(lb.format, val)
204 }
205}
206
207//insert one item from list model
208func (lb *ListBox) insertItemAt(index int) error {

Callers 2

insertItemAtMethod · 0.95

Calls 2

ValueMethod · 0.65
FormatMethod · 0.45

Tested by

no test coverage detected