Disabled inputs can no longer be selected
This commit is contained in:
parent
3ef13955be
commit
46268c8d02
@ -39,6 +39,7 @@ func (element *TextBox) Resize (width, height int) {
|
||||
}
|
||||
|
||||
func (element *TextBox) HandleMouseDown (x, y int, button tomo.Button) {
|
||||
if !element.enabled { return }
|
||||
element.Select()
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ func run () {
|
||||
|
||||
firstName := basic.NewTextBox("First name", "")
|
||||
lastName := basic.NewTextBox("Last name", "")
|
||||
lastName.SetEnabled(false)
|
||||
fingerLength := basic.NewTextBox("Length of fingers", "")
|
||||
button := basic.NewButton("Ok")
|
||||
|
||||
|
Reference in New Issue
Block a user