NewAt inserts a new blank element at the given index in the slice. -1 indicates to insert the element at the end.
(idx int)
| 356 | // NewAt inserts a new blank element at the given index in the slice. |
| 357 | // -1 indicates to insert the element at the end. |
| 358 | func (tb *Table) NewAt(idx int) { |
| 359 | tb.NewAtSelect(idx) |
| 360 | reflectx.SliceNewAt(tb.Slice, idx) |
| 361 | if idx < 0 { |
| 362 | idx = tb.SliceSize |
| 363 | } |
| 364 | |
| 365 | tb.This.(Lister).UpdateSliceSize() |
| 366 | tb.SelectIndexEvent(idx, events.SelectOne) |
| 367 | tb.UpdateChange() |
| 368 | tb.IndexGrabFocus(idx) |
| 369 | } |
| 370 | |
| 371 | // DeleteAt deletes the element at the given index from the slice. |
| 372 | func (tb *Table) DeleteAt(idx int) { |
nothing calls this directly
no test coverage detected