Replies: 1 comment
-
Hi @spersson ,if you still not found a solution,maybe you could try follwing code in egui/egui/src/widgets/button.rs Lines 178 to 187 in 87ca291 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What I am trying to do is something like the cells in an excel spreadsheet. Focus can be moved to a cell but it remains "locked" for text editing until you press F2 or click mouse inside. The main reason for doing this is so that the left and right arrow keys do not move the text cursor but instead shifts the focus to next cell. Is there any elegant way to do this in egui? I have tried a few different things but didn't work out.
The first way I tried was to disable the textedits but then they can't receive focus at all (which makes sense).
Secondly I tried to overlay a frame over a disabled text edit, have that one sense focus and if clicked while already focused would then enable the underlying textedit. But Frame is not interactive and not receiving focus so I tried adding that sensing to the Frame's response but it didn't work.
I still think this two layer approach seems like the "correct" way to do something like this, I am just left wondering how.
Beta Was this translation helpful? Give feedback.
All reactions