-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
TextGrid - Random Errors when running the application #5356
Comments
Can you please provide a fully runnable code example and also specify what error you are getting? That makes it a lot easier for us to test. |
Hi, Of course, here it is with another kind of possible random error. Hope it helps. I just want to say that's it's a lot of effort to use those TextGrid. I looked in detail of what you guys did for the Fyne terminal, which is amazing by the way. Maybe at looking at this little piece of code, you could give me some advice and even giving some insight on the why TextGrid are capable to resize the window size when growing in size ? It's blowing my mind. Thanks for you precious help. |
For an editor I would recommend using the Any widget will cause the window to expand if their min size is larger than the window allows. |
That’s very interesting. How would I manage syntax highlighting ? Line numbers ?
Any exemple ?
Thanks a lot in advance.
|
I guess those are not in yet. colouring will be in 2.6 but the line numbers might need to be added in your own code. It's a tradeoff really - the TextGrid is low level for display so you need to add the editor, the Entry is higher level entry but currently plain text only. |
Ok ok thanks for your answer. TextGrid are of course low level but the Fyne's implementation does not really help. I really want to make it work. It could be amazing. Actually, I was in need in a Table to avoid my cell value to overflow onto the next columns. So I start asking myself how to manage the scroll. I realized by looking at the entry widget that all the scroll concept is fully internal to Fyne. The same applies to the TextGrid. Of course the fact that the TextGrid simply expend the window is a big problem. But, it's not possible, in my understanding, to create a scroll container or something like that outside of Fyne. In fact, I'm facing the same issue with the simple need of making a progress bar red and another one blue to represent health and mana points. I really love Fyne and I use it a lot. But, once that the needs are a bit specific and outside of the scope, I feel like too much is private and forces to modify Fyne itself. I personally like the approach that I'm doing my own Fyne extension library and add on top of it and still be able to update Fyne as necessary without loosing my additions. And it's seems to me that's the philosophy behind Fyne's API. Like it's described in the docs. If you need something specific, simply extend on your side. Maybe I'm wrong and misunderstanding everything. But again, Fyne is amazing in a lot of ways. |
Nope, you can do
The progress bar uses primary colour. You can have different progress bars by wrapping them in
Nope you are right about that :) |
Oh indeed I completely missed that container ! Guess it's pretty new and did not make it's way to the doc yet. And I understand now the logic behind the bar coloration ! Once you know it ! 😄 |
It was added in v1.4, moved from |
I personally prefer to use the official pkg.go.dev website for all my API documentation uses. Given that information there is updated automagically when a new package release is pushed, it is always up to date and as it is the official site it moves along feature wise quite a lot. The list at https://pkg.go.dev/fyne.io/fyne/[email protected]/widget has all the widgets, https://pkg.go.dev/fyne.io/fyne/[email protected]/container has all the containers and so on. If you want images and examples then our own docs page is miles ahead though. |
Alright, thanks for the very useful advises. I tried the container.NewScroll in a table. It's not very useable out of the box since when the mouse is on a cell, the scroll event is not sent on the underlying scroll container. Sorry, I know that's not the subject of this bug report. I should probably open a discussion on the subject. |
I would not put a scroll inside a table because nesting scrolls is a bad idea. As you say though, its a different topic. |
Checklist
Describe the bug
I'm trying to work with TextGrid to craft an editor. But I sometimes getting this error at the start of the app. I just need to restart the app for it to disappear. It seems to only appear if I close the app abruptly with the stop button from Goland.
Any idea what's going on ? I'm running Linux.
How to reproduce
Screenshots
No response
Example code
Fyne version
2.5.3
Go compiler version
1.23.1
Operating system and version
Linux 6.11.11-1-MANJARO (Wayland)
Additional Information
More docs around TextGrid would be greatly appreciated ;)
The text was updated successfully, but these errors were encountered: