本文整理匯總了Golang中github.com/nelsam/gxui/themes/basic.Theme.CreateList方法的典型用法代碼示例。如果您正苦於以下問題:Golang Theme.CreateList方法的具體用法?Golang Theme.CreateList怎麽用?Golang Theme.CreateList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/nelsam/gxui/themes/basic.Theme
的用法示例。
在下文中一共展示了Theme.CreateList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Init
func (p *Projects) Init(driver gxui.Driver, theme *basic.Theme) {
p.driver = driver
p.theme = theme
p.button = createIconButton(driver, theme, "projects.png")
p.projects = theme.CreateList()
p.projectsAdapter = gxui.CreateDefaultAdapter()
p.projectsAdapter.SetItems(settings.Projects())
p.projects.SetAdapter(p.projectsAdapter)
}
示例2: Init
func (d *ProjectTree) Init(driver gxui.Driver, theme *basic.Theme) {
d.driver = driver
d.theme = theme
d.button = createIconButton(driver, theme, "folder.png")
d.dirs = theme.CreateTree()
d.dirsAdapter = dirTree(os.Getenv("HOME"))
d.dirs.SetAdapter(d.dirsAdapter)
d.files = theme.CreateList()
d.filesAdapter = fileList(os.Getenv("HOME"))
d.files.SetAdapter(d.filesAdapter)
d.layout = newSplitterLayout(d.theme)
d.layout.SetOrientation(gxui.Vertical)
d.layout.AddChild(d.dirs)
d.layout.AddChild(d.files)
d.dirs.OnSelectionChanged(func(selection gxui.AdapterItem) {
d.filesAdapter = fileList(selection.(string))
d.files.SetAdapter(d.filesAdapter)
})
}