MCPcopy
hub / github.com/g3n/engine / setCell

Method setCell

gui/table.go:678–687  ·  view source on GitHub ↗

setCell sets the value of the cell specified by its row and column id

(row int, colid string, value interface{})

Source from the content-addressed store, hash-verified

676
677// setCell sets the value of the cell specified by its row and column id
678func (t *Table) setCell(row int, colid string, value interface{}) {
679
680 c := t.header.cmap[colid]
681 if c == nil {
682 return
683 }
684 cell := t.rows[row].cells[c.order]
685 cell.label.SetText(fmt.Sprintf(c.format, value))
686 cell.value = value
687}
688
689// insertRow is the internal version of InsertRow which does not call recalc()
690func (t *Table) insertRow(row int, values map[string]interface{}) {

Callers 2

SetCellMethod · 0.95
setRowMethod · 0.95

Calls 1

SetTextMethod · 0.45

Tested by

no test coverage detected