Label and Heading are now selectable
This commit is contained in:
parent
0cdb116ec1
commit
4fc44c11e8
@ -18,6 +18,8 @@ func NewHeading (level int, text string) *Heading {
|
|||||||
this.SetRole(tomo.R("objects", "Heading"))
|
this.SetRole(tomo.R("objects", "Heading"))
|
||||||
this.SetTag(fmt.Sprint(level), true)
|
this.SetTag(fmt.Sprint(level), true)
|
||||||
this.SetText(text)
|
this.SetText(text)
|
||||||
|
this.SetSelectable(true)
|
||||||
|
this.SetFocusable(true)
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
label.go
2
label.go
@ -13,5 +13,7 @@ func NewLabel (text string) *Label {
|
|||||||
this.SetRole(tomo.R("objects", "Label"))
|
this.SetRole(tomo.R("objects", "Label"))
|
||||||
this.SetText(text)
|
this.SetText(text)
|
||||||
this.SetAttr(tomo.AAlign(tomo.AlignStart, tomo.AlignMiddle))
|
this.SetAttr(tomo.AAlign(tomo.AlignStart, tomo.AlignMiddle))
|
||||||
|
this.SetSelectable(true)
|
||||||
|
this.SetFocusable(true)
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user