From 731fa9c973eb0e47ec4ea0aaee42c8481e658561 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 2 Sep 2018 03:29:36 -0400 Subject: [PATCH] And finished the table example program. --- zz_table.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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) {