-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Expose TextView's SetScrollable and SetChangedFunc in YAML config so views can be non-scrollable and trigger redraws or callbacks when content changes (e.g. for live-updating displays).
Background
Discovered while planning a tview presentation demo implementation via tviewyaml. The TextView1 slide uses SetScrollable(false) and SetChangedFunc for a live-updating counter that writes to the TextView from a goroutine.
Demo Usage
TextView1 uses SetScrollable(false) and SetChangedFunc for live updates.
Proposed Approach
- Add
scrollable: false(default true) andonChanged(template expression) to TextView primitive - In
builder/properties.go, callSetScrollableandSetChangedFuncwhen configured - For
onChanged, the callback can triggerapp.Draw()or run a template action
Relevant Files
config/types.go– addscrollable,onChangedfor textViewbuilder/properties.go–applyTextViewPropertiesdocs/tview-coverage.md– document once implemented
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels