successfully set the columns from the passed in array
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
73a084d969
commit
366224aaec
44
gui.go
44
gui.go
|
@ -305,26 +305,6 @@ func AddTableTab(name string, rowcount int, parts []InputData) {
|
||||||
|
|
||||||
time.Sleep(1 * 1000 * 1000 * 1000)
|
time.Sleep(1 * 1000 * 1000 * 1000)
|
||||||
|
|
||||||
/*
|
|
||||||
initColumnNames(mh, "BG", "")
|
|
||||||
initColumnNames(mh, "TEXTCOLOR", "header1")
|
|
||||||
initColumnNames(mh, "BUTTON", "header2")
|
|
||||||
initColumnNames(mh, "TEXTCOLOR", "header3")
|
|
||||||
initColumnNames(mh, "TEXTCOLOR", "header4")
|
|
||||||
initColumnNames(mh, "TEXT", "header5")
|
|
||||||
initColumnNames(mh, "BUTTON", "header6")
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
initBTcolor (mh, 0)
|
|
||||||
initTextColorColumn(mh, 1, 2, "really fun", ui.TableColor{0.9, 0, 0, 1})
|
|
||||||
initButtonColumn (mh, 3, "but3ton")
|
|
||||||
initTextColorColumn(mh, 4, 5, "jwc45blah", ui.TableColor{0.0, 0.9, 0.4, 1})
|
|
||||||
initTextColorColumn(mh, 6, 7, "jwc67blah", ui.TableColor{0.3, 0.1, 0.9, 1})
|
|
||||||
initTextColumn (mh, 8, "jwc8blah")
|
|
||||||
initButtonColumn (mh, 9, "but9ton")
|
|
||||||
*/
|
|
||||||
|
|
||||||
// spew.Dump(mh)
|
// spew.Dump(mh)
|
||||||
log.Println(mh)
|
log.Println(mh)
|
||||||
|
|
||||||
|
@ -354,12 +334,24 @@ func AddTableTab(name string, rowcount int, parts []InputData) {
|
||||||
RowBackgroundColorModelColumn: tmpBTindex,
|
RowBackgroundColorModelColumn: tmpBTindex,
|
||||||
})
|
})
|
||||||
|
|
||||||
appendTextColumn (mh, table, 1, "jwc1col")
|
for key, foo := range parts {
|
||||||
table.AppendButtonColumn("button3", 3, ui.TableModelColumnAlwaysEditable)
|
log.Println(key, foo)
|
||||||
appendTextColorColumn (mh, table, 4, 5, "testcolor")
|
initColumnNames(mh, foo.CellType, foo.Heading)
|
||||||
appendTextColorColumn (mh, table, 6, 7, "appendTest")
|
if (foo.CellType == "BG") {
|
||||||
appendTextColumn (mh, table, 8, "jwc8col")
|
} else if (foo.CellType == "BUTTON") {
|
||||||
table.AppendButtonColumn("button9", 9, ui.TableModelColumnAlwaysEditable)
|
tmpBTindex += 1
|
||||||
|
table.AppendButtonColumn("button3", tmpBTindex, ui.TableModelColumnAlwaysEditable)
|
||||||
|
} else if (foo.CellType == "TEXTCOLOR") {
|
||||||
|
tmpBTindex += 1
|
||||||
|
appendTextColorColumn (mh, table, tmpBTindex, tmpBTindex + 1, "testcolor")
|
||||||
|
tmpBTindex += 1
|
||||||
|
} else if (foo.CellType == "TEXT") {
|
||||||
|
tmpBTindex += 1
|
||||||
|
appendTextColumn (mh, table, tmpBTindex, "jwc1col")
|
||||||
|
} else {
|
||||||
|
panic("I don't know what this is in initColumnNames")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
maintab.Append(name, table)
|
maintab.Append(name, table)
|
||||||
maintab.SetMargined(tabcount, true)
|
maintab.SetMargined(tabcount, true)
|
||||||
|
|
Loading…
Reference in New Issue