[GH-ISSUE #946] .SetTitle() does not work on a Modal. #692

Closed
opened 2026-03-04 01:07:04 +03:00 by kerem · 1 comment
Owner

Originally created by @nf-brentsaner on GitHub (Feb 7, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/946

.SetTitle() does not work whatsoever on a Modal.

Quick PoC:

package main

import (
	`github.com/rivo/tview`
)

func main() {

	var app *tview.Application = tview.NewApplication()
	var m *tview.Modal = tview.NewModal()

	m.SetText("blerh")
	m.SetTitle("Foobar")
	app.SetRoot(m, false)
	app.Run()
}

As seen, blerh shows up, but no title on the Modal with Foobar does:

image

(This occurs on go.mod version github.com/rivo/tview v0.0.0-20240204151237-861aa94d61c8)

Originally created by @nf-brentsaner on GitHub (Feb 7, 2024). Original GitHub issue: https://github.com/rivo/tview/issues/946 .SetTitle() does not work whatsoever on a Modal. Quick PoC: ```go package main import ( `github.com/rivo/tview` ) func main() { var app *tview.Application = tview.NewApplication() var m *tview.Modal = tview.NewModal() m.SetText("blerh") m.SetTitle("Foobar") app.SetRoot(m, false) app.Run() } ``` As seen, `blerh` shows up, but no title on the Modal with `Foobar` does: ![image](https://github.com/rivo/tview/assets/128020063/8a146141-d54d-4e10-b5a8-5925b39a622a) (This occurs on go.mod version `github.com/rivo/tview v0.0.0-20240204151237-861aa94d61c8`)
kerem closed this issue 2026-03-04 01:07:04 +03:00
Author
Owner

@rivo commented on GitHub (Mar 7, 2024):

Thanks. The latest commit should fix this.

<!-- gh-comment-id:1984068906 --> @rivo commented on GitHub (Mar 7, 2024): Thanks. The latest commit should fix this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#692
No description provided.