diff --git a/examples/scroll/main.go b/examples/scroll/main.go index 60fd6fe..0937b68 100644 --- a/examples/scroll/main.go +++ b/examples/scroll/main.go @@ -19,28 +19,28 @@ func run () { disconnectedContainer := elements.NewHBox(false, true) list := elements.NewList ( - 1, - elements.NewCell(elements.NewLabel("This is list item 0", false)), - elements.NewCell(elements.NewLabel("This is list item 1", false)), - elements.NewCell(elements.NewLabel("This is list item 2", false)), - elements.NewCell(elements.NewLabel("This is list item 3", false)), - elements.NewCell(elements.NewLabel("This is list item 4", false)), - elements.NewCell(elements.NewLabel("This is list item 5", false)), - elements.NewCell(elements.NewLabel("This is list item 6", false)), - elements.NewCell(elements.NewLabel("This is list item 7", false)), - elements.NewCell(elements.NewLabel("This is list item 8", false)), - elements.NewCell(elements.NewLabel("This is list item 9", false)), - elements.NewCell(elements.NewLabel("This is list item 10", false)), - elements.NewCell(elements.NewLabel("This is list item 11", false)), - elements.NewCell(elements.NewLabel("This is list item 12", false)), - elements.NewCell(elements.NewLabel("This is list item 13", false)), - elements.NewCell(elements.NewLabel("This is list item 14", false)), - elements.NewCell(elements.NewLabel("This is list item 15", false)), - elements.NewCell(elements.NewLabel("This is list item 16", false)), - elements.NewCell(elements.NewLabel("This is list item 17", false)), - elements.NewCell(elements.NewLabel("This is list item 18", false)), - elements.NewCell(elements.NewLabel("This is list item 19", false)), - elements.NewCell(elements.NewLabel("This is list item 20", false))) + 2, + elements.NewCell(elements.NewLabel("Item 0", false)), + elements.NewCell(elements.NewLabel("Item 1", false)), + elements.NewCell(elements.NewLabel("Item 2", false)), + elements.NewCell(elements.NewLabel("Item 3", false)), + elements.NewCell(elements.NewLabel("Item 4", false)), + elements.NewCell(elements.NewLabel("Item 5", false)), + elements.NewCell(elements.NewLabel("Item 6", false)), + elements.NewCell(elements.NewLabel("Item 7", false)), + elements.NewCell(elements.NewLabel("Item 8", false)), + elements.NewCell(elements.NewLabel("Item 9", false)), + elements.NewCell(elements.NewLabel("Item 10", false)), + elements.NewCell(elements.NewLabel("Item 11", false)), + elements.NewCell(elements.NewLabel("Item 12", false)), + elements.NewCell(elements.NewLabel("Item 13", false)), + elements.NewCell(elements.NewLabel("Item 14", false)), + elements.NewCell(elements.NewLabel("Item 15", false)), + elements.NewCell(elements.NewLabel("Item 16", false)), + elements.NewCell(elements.NewLabel("Item 17", false)), + elements.NewCell(elements.NewLabel("Item 18", false)), + elements.NewCell(elements.NewLabel("Item 19", false)), + elements.NewCell(elements.NewLabel("Item 20", false))) list.Collapse(0, 32) scrollBar := elements.NewScrollBar(true) list.OnScrollBoundsChange (func () {