Skip to content

feat: expose TextView SetScrollable and SetChangedFunc in YAML #7

Description

@cassdeckard

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) and onChanged (template expression) to TextView primitive
  • In builder/properties.go, call SetScrollable and SetChangedFunc when configured
  • For onChanged, the callback can trigger app.Draw() or run a template action

Relevant Files

  • config/types.go – add scrollable, onChanged for textView
  • builder/properties.goapplyTextViewProperties
  • docs/tview-coverage.md – document once implemented

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions