IsReadOnly returns whether this node is flagged as [ReadOnly] or [Disabled]. If so, behave appropriately. Styling is based on each state separately, but behaviors are often the same for both of these states.
()
| 59 | // If so, behave appropriately. Styling is based on each state separately, |
| 60 | // but behaviors are often the same for both of these states. |
| 61 | func (wb *WidgetBase) IsReadOnly() bool { |
| 62 | return wb.StateIs(states.ReadOnly) || wb.StateIs(states.Disabled) |
| 63 | } |
| 64 | |
| 65 | // SetReadOnly sets the [states.ReadOnly] flag to the given value. |
| 66 | func (wb *WidgetBase) SetReadOnly(ro bool) *WidgetBase { |
no test coverage detected