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
HOWTO? grid layout with different size columns #737
Comments
Yes, that is correct, our grid layout is a uniform grid. I guess you are looking for a table widget, which we have not yet created. The plan is that it would be built on top of the data binding API we are adding in release 1.3. There are some workarounds posted where people have used combined layouts to create the effect. Like #157? |
Wow, talk about responsiveness. Thanks! |
I note that #157 doesn't help at all though, columns are still the max of any cell: |
Goodness you are quite right - I never ran the code that was contributed ;) (Full code attached to #157) |
It should be noted that this only work as long as all of your cells have the same height, otherwise alignment goes off |
Would you mind gist-ing your solution? Also, to use that code I had to download and manually install v3.2/glfw in vendor per icexin/gocraft#8 (comment) |
Did you copy and paste my updated code? There is no instance of “NewVBox(objects...)” in what I pasted (it’s HBox). |
If you are performing your own vendoring then yes that is an issue - we have introduced a new “fyne vendor” command that solves this for you - I haven’t mentioned it on the website yet but you could try it out if you have the latest version of the ‘fyne’ command. |
You didn't mention that you had updated #157 (comment) :) so no, I didn't... (and thanks!) Requiring |
Apologies, I was working on 3 issues concurrently ;). Fyne vendor may feel like a hack but unfortunately it’s due to the design of go vendor, as the missing directory contains no go code... if you have a better solution we would be glad :) |
I note that installing "fyne" requires |
And unfortunately...
Thanks so much for your amazing and prompt help. |
It’s not mentioned everywhere but I think the first place mentioning the command should cover it https://tour.fyne.io/introduction/packaging.html. |
Apologies, the vendor subcommand is currently in testing so you’d need to build it from the develop branch. (Now that I think about it that’s probably why it’s not documented anywhere yet ;) ). |
|
And I confirm that #157 (comment) does what I'm after... Now to adapt! Thanks! |
Great, thanks for letting us know. Can we close this as a duplicate of that ticket do you think? |
Well, people will stumble on the vendor problem, but yes. Closing as duplicate of #157 now that #157 (comment) does what's needed. I'll move discussion of |
Describe the bug:
I've been trying to make a simple grid of labels that has appropriately sized columns based on the text in the label widgets in the columns, and I just fail to do it. It seems that all the columns are always set to the same size. I've tried a GridLayoutWithRows of a GridLayoutWithColumns and several other things. Even though the MinSize() of the column is correctly calculated, when you push it into
To Reproduce:
Here's a snippet of one of many approaches I've tried. With every single approach I end up with identical column widths: https://gist.github.com/rfay/85aeb42ba7175f331639a259885a6e4d
Screenshots:
Example code:
Snippet: https://gist.github.com/rfay/85aeb42ba7175f331639a259885a6e4d
Device (please complete the following information):
The text was updated successfully, but these errors were encountered: