(index int)
| 189 | } |
| 190 | |
| 191 | func (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 |
| 208 | func (lb *ListBox) insertItemAt(index int) error { |
no test coverage detected