textual
textual copied to clipboard
ListView from ScrollView
Hi @willmcgugan. I'd like to open this issue a s a means of tracking one of the backlog items. Maybe there are more people interested in this feature. After days of trying I was unable to do it myself.
![Screenshot 2022-03-15 at 06 40 40](https://user-images.githubusercontent.com/838921/158321745-bd8500fd-1511-4b1a-adf4-6c2f1afb4c50.png)
I was not able to find a way to create a scrollable list that could overflow out of screen with a nice scroll bar.
DirectoryTree was my main inspiration but I couldn't find a way to make it dockable like this:
await self.view.dock(
ScrollView(self.directory), edge="left", size=48, name="sidebar"
)
It would be great to make the new ListView for example to contain a list of object, then bind a property like name to display something visible and then on selection to be able simply pass itself (full object) to another destination panel.
Anyone can share some ideas/tips on how to proceed or what to try?
We're working on a branch which will make these kind of things easier to create. And there will likely be a builtin list view.
I'm afraid I can't help you much with this right now. But we will be maintaining the 0.1 branch for a while, so you could maybe build this is a third party lib?
Something like this was discussed in https://github.com/Textualize/textual/discussions/196 I believe
thanks @cvaniak and for the demo and thanks @wasi-master for ping on the solution
https://github.com/Textualize/textual/wiki/Sorry-we-closed-your-issue
Did we solve your problem?
Glad we could help!