Update code for objects
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user