验证中...
Languages: Go
Categories: Android 组件
Latest update 2019-05-16 12:34
main.go
Raw Copy
package main
import (
"fmt"
"github.com/andlabs/ui"
)
type MH struct {
}
func (mh *MH) ColumnTypes(m *ui.TableModel) []ui.TableValue {
return []ui.TableValue{
ui.TableString(""), // column 0 text
}
}
func (mh *MH) NumRows(m *ui.TableModel) int {
return 15
}
func (mh *MH) CellValue(m *ui.TableModel, row, column int) ui.TableValue {
return ui.TableString(fmt.Sprintf("Row %d iugdiubasjybcuevkwuchvgkuweyrbckuvyskdvctyerckuyvaiueryb", row))
}
func (mh *MH) SetCellValue(m *ui.TableModel, row, column int, value ui.TableValue) {
}
func main() {
ui.Main(shit)
}
func shit() {
w := ui.NewWindow("title", 400, 400, false)
w.OnClosing(func(*ui.Window) bool {
ui.Quit()
return true
})
w.SetChild(newTable())
w.Show()
}
func newTable() *ui.Table {
table := ui.NewTable(&ui.TableParams{
Model: ui.NewTableModel(&MH{}),
})
table.AppendTextColumn("name qwe", 0, ui.TableModelColumnAlwaysEditable, nil)
return table
}

Comment list( 0 )

You need to Sign in for post a comment

Help Search

183227_9af5e6a8_1826025 111910_4d91f001_1826025