And finished the table example program.

This commit is contained in:
Pietro Gagliardi 2018-09-02 03:29:36 -04:00
parent 5b9b35a317
commit 731fa9c973
1 changed files with 14 additions and 0 deletions

View File

@ -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) {