Fork me on GitHub
#cljfx
<
2021-01-27
>
benny04:01:11

I'm liking cljfx so far and I would like to make a tiny project with it. I would like some guidance on what direction to go in. Basically I would like to have a dialog pop-up a small window with a single text-field which I type into and then have suggestions come up like in slack in the "search clojurians" at the top. And the result is just inserted (on Windows) into the previously active focused window. (I think some type/dialog should revert the focus back to where it was.)

vlaaad08:01:51

I would suggest to start looking at/running examples

vlaaad08:01:54

this one might be a good start, as it shows a sort of a popup you are talking about: https://github.com/cljfx/cljfx/blob/master/examples/e03_map_event_handler.clj

benny15:01:42

That is great @U47G49KHQ! That's almost already done, just adding a label with the selected css property and the GUI is basically done. 🙂

joelkuiper10:01:47

I had a similar bit of confusion maybe just for reference. If you place the text-input-dialog in a ref and adjust the show/hide the focus shifts as it remains part of the scene. If you conditionally add the dialog to the scene instead of adjusting the showing value the focus is correctly on the text field if the dialog enters the scene