Store role in Boxes

This commit is contained in:
2024-06-03 21:13:18 -04:00
parent d8ae20d739
commit 2ab920eb26
14 changed files with 40 additions and 19 deletions

View File

@@ -19,7 +19,8 @@ type TextInput struct {
// NewTextInput creates a new text input containing the specified text.
func NewTextInput (text string) *TextInput {
this := &TextInput { TextBox: tomo.NewTextBox() }
tomo.Apply(this, tomo.R("objects", "TextInput", ""))
this.SetRole(tomo.R("objects", "TextInput", ""))
tomo.Apply(this)
this.SetAlign(tomo.AlignStart, tomo.AlignMiddle)
this.SetText(text)
this.SetFocusable(true)