Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list displays only 1 row on Windows #39

Open
HFolkertH opened this issue Oct 16, 2024 · 3 comments
Open

list displays only 1 row on Windows #39

HFolkertH opened this issue Oct 16, 2024 · 3 comments

Comments

@HFolkertH
Copy link

The million numbers List example shows me only 1 row instead of the 5 rows as shown on rye-fyne website.

image

My screen.
image

Could that be a Windows problem?

And how can I set the number of listed rows from 5 to something else?

@refaktor
Copy link
Owner

refaktor commented Oct 16, 2024

How big is the window itself in your case and in your code do you call |resize size 220.0 200.0 ?

That call determines the window size, without it the list would reduce to minimum or one row. The number of rows it shows in the consequence of the window size in this example.

@HFolkertH
Copy link
Author

the canvas itself is large enough

a. app
|window "Hello Folkert"
|resize size 1200.0 800.0

image

I will test the same code on my macbook later on. Perhaps it is OS related.

@refaktor
Copy link
Owner

refaktor commented Oct 16, 2024

Aha, that is a different example / demo ... that one shows one line for me also and it's expected. The reason is that the parent is v-box and both boxes always reduce the items in them to minimum.

If you want the list to extend you have to use different combinations of layouts. I in fact don't have that much experience with Fyne yet, but the one layout that takes all available space is called border. It has a little unusual api ... first 4 arguments are border widgers for top bottom left right, and the last argument is a block of items that it expands to maximum.

Look at the Shopping list app example on how border is used to expand list to the maximum and input to the bottom. cont: border nil input nil nil [ lst ]

I plan to add page about layouts and layouting tricks to the cookbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants