diff options
| author | trustable-code <krauter.simon@arcor.de> | 2019-03-21 19:35:17 +0100 |
|---|---|---|
| committer | trustable-code <krauter.simon@arcor.de> | 2019-03-21 19:35:17 +0100 |
| commit | 17d3d8a6fdcf0f2a04cb51634c55b5121806b57e (patch) | |
| tree | 189a76a6e2f914c726060163c3864f1780b3fa3e /examples | |
| parent | 5db633273f00349500a366f89149692b0ca701f1 (diff) | |
| download | NiGui-17d3d8a6fdcf0f2a04cb51634c55b5121806b57e.tar.gz NiGui-17d3d8a6fdcf0f2a04cb51634c55b5121806b57e.zip | |
example_14_container_scrolling: eliminate fixed height value
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/example_14_container_scrolling.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/example_14_container_scrolling.nim b/examples/example_14_container_scrolling.nim index 95923d0..157ca53 100755 --- a/examples/example_14_container_scrolling.nim +++ b/examples/example_14_container_scrolling.nim @@ -1,8 +1,10 @@ # This example shows an inner container with a scrollbar. # Result: # topContainer will take as many space as needed for the 5 labels. +# scrollContainer takes the remaining space. # There is only one scrollbar: -# The vertical scrollbar in scrollContainer, because it has an insufficient fixed height. +# The vertical scrollbar in scrollContainer, because it's height is insufficient for the 25 labels. +# When the window height is increased, the scrollbar disappears. import NiGui @@ -23,7 +25,7 @@ for i in 1..5: var scrollContainer = newLayoutContainer(Layout_Vertical) mainContainer.add(scrollContainer) -scrollContainer.height = 300 +scrollContainer.heightMode = HeightMode_Expand scrollContainer.widthMode = WidthMode_Expand for i in 1..25: |
