You can choose whether or not you want text to wrap
This commit is contained in:
@@ -11,7 +11,7 @@ func main () {
|
||||
func run () {
|
||||
window, _ := tomo.NewWindow(480, 360)
|
||||
window.SetTitle("example label")
|
||||
window.Adopt(basic.NewLabel(text))
|
||||
window.Adopt(basic.NewLabel(text, true))
|
||||
window.OnClose(tomo.Stop)
|
||||
window.Show()
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@ func run () {
|
||||
container := basic.NewContainer(layouts.Vertical { true, true })
|
||||
window.Adopt(container)
|
||||
|
||||
label := basic.NewLabel("it is a label hehe")
|
||||
label := basic.NewLabel("it is a label hehe", false)
|
||||
button := basic.NewButton("drawing pad")
|
||||
okButton := basic.NewButton("OK")
|
||||
button.OnClick (func () {
|
||||
container.DisownAll()
|
||||
container.Adopt(basic.NewLabel("Draw here:"), false)
|
||||
container.Adopt(basic.NewLabel("Draw here:", false), false)
|
||||
container.Adopt(basic.NewTest(), true)
|
||||
container.Adopt(okButton, false)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user