SetText sets the text of this menu item
(text string)
| 598 | |
| 599 | // SetText sets the text of this menu item |
| 600 | func (mi *MenuItem) SetText(text string) *MenuItem { |
| 601 | |
| 602 | if mi.label == nil { |
| 603 | return mi |
| 604 | } |
| 605 | mi.label.SetText(text) |
| 606 | mi.update() |
| 607 | mi.menu.recalc() |
| 608 | return mi |
| 609 | } |
| 610 | |
| 611 | // SetShortcut sets the keyboard shortcut of this menu item |
| 612 | func (mi *MenuItem) SetShortcut(mods window.ModifierKey, key window.Key) *MenuItem { |