Modal title is not shown #24

Closed
opened 2020-06-17 21:15:35 +00:00 by makeworld-the-better-one · 10 comments
makeworld-the-better-one commented 2020-06-17 21:15:35 +00:00 (Migrated from gitlab.com)

I cannot get the modal title text to display, despite setting it with modal.SetTitle, as well as setting the color and alignment. I am using the latest commit, f477be8b.

I cannot get the modal title text to display, despite setting it with `modal.SetTitle`, as well as setting the color and alignment. I am using the latest commit, f477be8b.
tslocum commented 2020-06-18 22:18:27 +00:00 (Migrated from gitlab.com)

closed via commit 2a76c36094

closed via commit 2a76c36094d1acdcf6a06cce7be2f510c23b3471
makeworld-the-better-one commented 2020-06-18 22:44:12 +00:00 (Migrated from gitlab.com)

How is this issue closed? SetTitle still does not work, as far as I can see.

How is this issue closed? SetTitle still does not work, as far as I can see.
tslocum commented 2020-06-18 22:47:58 +00:00 (Migrated from gitlab.com)

I updated the documentation for Modal to add:

You may change the title and appearance of the window by modifying the Frame returned by GetFrame.

I updated [the documentation for Modal](https://docs.rocketnine.space/gitlab.com/tslocum/cview/#Modal) to add: You may change the title and appearance of the window by modifying the Frame returned by GetFrame.
makeworld-the-better-one commented 2020-06-18 22:51:22 +00:00 (Migrated from gitlab.com)

Yes, but could you remove SetTitle then, and any other functions that won't change the display? Or preferably, make it use the frame? Because right now the function does nothing.

Thanks for responding to all my issues by the way, I appreciate it.

Yes, but could you remove `SetTitle` then, and any other functions that won't change the display? Or preferably, make it use the frame? Because right now the function does nothing. Thanks for responding to all my issues by the way, I appreciate it.
tslocum commented 2020-06-18 22:57:02 +00:00 (Migrated from gitlab.com)

Replacing the embedded Box with an embedded Frame without further modifications doesn't seem to work (it results in a blank screen). If you submit a PR for this I would be glad to merge it.

Replacing the embedded Box with an embedded Frame without further modifications doesn't seem to work (it results in a blank screen). If you submit a PR for this I would be glad to merge it.
makeworld-the-better-one commented 2020-06-18 22:58:10 +00:00 (Migrated from gitlab.com)

I'm confused what you mean by that, sorry. But anyway, I will change the frame instead now.

I'm confused what you mean by that, sorry. But anyway, I will change the frame instead now.
tslocum commented 2020-06-18 23:06:48 +00:00 (Migrated from gitlab.com)

Modal embeds Box, but its actual display is a Frame, causing this unexpected behavior.

Modal [embeds](https://golang.org/doc/effective_go.html#embedding) Box, but its actual display is a Frame, causing this unexpected behavior.
makeworld-the-better-one commented 2020-06-19 15:13:50 +00:00 (Migrated from gitlab.com)

I still cannot get the modal title to show, with this code:

myModal.GetFrame().Clear()
myModal.GetFrame().AddText("My title", true, cview.AlignCenter, tcell.ColorWhite)

Am I doing something incorrectly?

I still cannot get the modal title to show, with this code: ```go myModal.GetFrame().Clear() myModal.GetFrame().AddText("My title", true, cview.AlignCenter, tcell.ColorWhite) ``` Am I doing something incorrectly?
tslocum commented 2020-06-19 15:16:46 +00:00 (Migrated from gitlab.com)

To achieve this please call SetTitle on the Frame.

To achieve this please call SetTitle on the Frame.
makeworld-the-better-one commented 2020-06-19 17:37:32 +00:00 (Migrated from gitlab.com)

My bad, thanks.

My bad, thanks.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
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: tslocum/cview#24
No description provided.