SetText sets the text of the slider optional label
(text string)
| 102 | |
| 103 | // SetText sets the text of the slider optional label |
| 104 | func (s *Slider) SetText(text string) *Slider { |
| 105 | |
| 106 | if s.label == nil { |
| 107 | s.label = NewLabel(text) |
| 108 | s.Panel.Add(s.label) |
| 109 | } else { |
| 110 | s.label.SetText(text) |
| 111 | } |
| 112 | s.update() |
| 113 | s.recalc() |
| 114 | return s |
| 115 | } |
| 116 | |
| 117 | // SetValue sets the value of the slider considering the current scale factor |
| 118 | // and updates its visual appearance. |
no test coverage detected