diff options
| author | Pietro Gagliardi <[email protected]> | 2018-09-02 03:29:36 -0400 | 
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2018-09-02 03:29:36 -0400 | 
| commit | 731fa9c973eb0e47ec4ea0aaee42c8481e658561 (patch) | |
| tree | 7f951ed4d0be4fcdfc4e24c8db2606ca8f18b0a3 | |
| parent | 5b9b35a317d8b052f63ee155644104c350ff8b02 (diff) | |
And finished the table example program.
| -rw-r--r-- | zz_table.go | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/zz_table.go b/zz_table.go index fc64d88..41cde9f 100644 --- a/zz_table.go +++ b/zz_table.go @@ -108,6 +108,20 @@ func (mh *modelHandler) CellValue(m *ui.TableModel, row, column int) ui.TableVal  }  func (mh *modelHandler) SetCellValue(m *ui.TableModel, row, column int, value ui.TableValue) { +	if row == 9 && column == 2 { +		mh.row9Text = string(value.(ui.TableString)) +	} +	if column == 6 {		// row background color +		prevYellowRow := mh.yellowRow +		mh.yellowRow = row +		if prevYellowRow != -1 { +			m.RowChanged(prevYellowRow) +		} +		m.RowChanged(mh.yellowRow) +	} +	if column == 7 {		// checkboxes +		mh.checkStates[row] = int(value.(ui.TableInt)) +	}  }  func appendImageNamed(i *ui.Image, which string) {  | 
