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

Method ShowColumn

gui/table.go:322–333  ·  view source on GitHub ↗

ShowColumn sets the visibility of the column with the specified id If the column id does not exit the function panics.

(col string, show bool)

Source from the content-addressed store, hash-verified

320// ShowColumn sets the visibility of the column with the specified id
321// If the column id does not exit the function panics.
322func (t *Table) ShowColumn(col string, show bool) {
323
324 c := t.header.cmap[col]
325 if c == nil {
326 panic(tableErrInvCol)
327 }
328 if c.Visible() == show {
329 return
330 }
331 c.SetVisible(show)
332 t.recalc()
333}
334
335// ShowAllColumns shows all the table columns
336func (t *Table) ShowAllColumns() {

Callers

nothing calls this directly

Calls 3

recalcMethod · 0.95
VisibleMethod · 0.65
SetVisibleMethod · 0.65

Tested by

no test coverage detected