Update code for objects

This commit is contained in:
2024-07-25 12:58:38 -04:00
parent 25a59d888c
commit 85fbe9c996
17 changed files with 247 additions and 163 deletions

View File

@@ -15,12 +15,13 @@ func NewTextView (text string) *TextView {
this.SetFocusable(true)
this.SetSelectable(true)
this.SetText(text)
this.SetOverflow(false, true)
this.SetWrap(true)
this.SetAttr(tomo.AOverflow(false, true))
this.SetAttr(tomo.AWrap(true))
this.OnScroll(this.handleScroll)
return this
}
func (this *TextView) handleScroll (catch func (), x, y float64) {
func (this *TextView) handleScroll (x, y float64) bool {
this.ScrollTo(this.ContentBounds().Min.Add(image.Pt(int(x), int(y))))
return true
}