Closed dkim19375 closed 1 month ago
Try to use update variable in some composable. E.g. add a checkbox showing its state.
Try to use update variable in some composable. E.g. add a checkbox showing its state.
The thing is, that my app is supposed to change a color of a Box
when certain keys are pressed, not from a checkbox.
I also haven't found a KeyEvent function that is composable
Found a solution (?) or workaround to this issue: I just added
update
at line 25 like this: https://paste.helpch.at/ujanunuyid.java
(I'm new to JB Compose - if this is intentional, then you can close this issue)
Nope, this shouldn't be done like this. Try to add a Box, which color depends on the state. It also should work.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
In
onKeyEvent
in theWindow
parameter, I have it change the state in another function to update the window However, it doesn't update, so how should I force the window to update? Code: https://paste.helpch.at/lomewinoqo.java Logs:It only prints
update
when the window is first created