Index returns the index of the specified TableViewColumn or -1 if it is not found.
(item *TableViewColumn)
| 53 | // Index returns the index of the specified TableViewColumn or -1 if it is not |
| 54 | // found. |
| 55 | func (l *TableViewColumnList) Index(item *TableViewColumn) int { |
| 56 | for i, lvi := range l.items { |
| 57 | if lvi == item { |
| 58 | return i |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | return -1 |
| 63 | } |
| 64 | |
| 65 | // Contains returns whether the specified TableViewColumn is found in the list. |
| 66 | func (l *TableViewColumnList) Contains(item *TableViewColumn) bool { |