Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Move in a List does not work when using ScrollArea #133

@Lallassu

Description

@Lallassu

When I add a ScrollArea to a VBox which contains a List and then add the list to the FocusChain I cannot move in the list with arrow-keys. It works fine as long as I don't have a ScrollArea around it. Am I missing something or is this a bug?

l := tui.NewList()
l.AddItems("line1", "line2", "line3", "line4")
l.SetSelected(0)
userScroll := tui.NewScrollArea(l)
userScroll.SetSizePolicy(tui.Preferred, tui.Maximum)
sidebar1 := tui.NewVBox(userScroll)
sidebar1.SetBorder(true)
sidebar1.SetTitle("List1")
sidebar.Prepend(sidebar1)
....
focusChain.Set(l, l2) // l2 is a list without a ScrollArea

Note that I have a "main" sidebar which holds 2 other sidebars (VBoxes) that contain a list each. One of them have a ScrollArea. And that one will not scroll when selected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions