[GH-ISSUE #394] SetDoneFunc in TreeView and List #289

Closed
opened 2026-03-04 01:03:39 +03:00 by kerem · 4 comments
Owner

Originally created by @agruenberg on GitHub (Jan 23, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/394

Hi, first of all: Thank you for your great work and your effort.
I have a List next to a TreeView and would like to switch with the Tab key. I don't know if I missed something, but it seems, that there is no SetDoneFunc in the TreeView and the SetDoneFunc in the List reacts only by pressing the Esc Key.
Any suggestions how to implement the desired behavior?

Thank you
Bildschirmfoto von 2020-01-23 23-45-04

Originally created by @agruenberg on GitHub (Jan 23, 2020). Original GitHub issue: https://github.com/rivo/tview/issues/394 Hi, first of all: Thank you for your great work and your effort. I have a List next to a TreeView and would like to switch with the Tab key. I don't know if I missed something, but it seems, that there is no SetDoneFunc in the TreeView and the SetDoneFunc in the List reacts only by pressing the Esc Key. Any suggestions how to implement the desired behavior? Thank you ![Bildschirmfoto von 2020-01-23 23-45-04](https://user-images.githubusercontent.com/19472717/73030824-baba0580-3e3a-11ea-8f15-8b0c5e008086.png)
kerem closed this issue 2026-03-04 01:03:40 +03:00
Author
Owner

@tslocum commented on GitHub (Jan 24, 2020):

Hey @agruenberg, you're looking for TreeNode.SetSelectedFunc and TreeView.SetSelectedFunc

<!-- gh-comment-id:577972652 --> @tslocum commented on GitHub (Jan 24, 2020): Hey @agruenberg, you're looking for TreeNode.SetSelectedFunc and TreeView.SetSelectedFunc
Author
Owner

@agruenberg commented on GitHub (Jan 24, 2020):

@tslocum thank you, but SetSelectedFunc is called by hitting enter. I'm searching for a handlerFunc where I can evaluate, which key was pressed. Usually you navigate with the tab key, therefore my question.

<!-- gh-comment-id:578033394 --> @agruenberg commented on GitHub (Jan 24, 2020): @tslocum thank you, but SetSelectedFunc is called by hitting enter. I'm searching for a handlerFunc where I can evaluate, which key was pressed. Usually you navigate with the tab key, therefore my question.
Author
Owner

@rivo commented on GitHub (Jan 25, 2020):

Yeah, that one was missing.

Actually, introducing this, I had to remove Tab/Backtab navigation for the TreeView. Since this is just a minor change, I think that's ok. (And it's more in line with other primitives.)

<!-- gh-comment-id:578402951 --> @rivo commented on GitHub (Jan 25, 2020): Yeah, that one was missing. Actually, introducing this, I had to remove Tab/Backtab navigation for the `TreeView`. Since this is just a minor change, I think that's ok. (And it's more in line with other primitives.)
Author
Owner

@agruenberg commented on GitHub (Jan 25, 2020):

@rivo great! Thank you very much!

<!-- gh-comment-id:578416385 --> @agruenberg commented on GitHub (Jan 25, 2020): @rivo great! Thank you very much!
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#289
No description provided.