|
|
On Tuesday, 14 December 2021 at 11:02:03 UTC Mark wrote:
I solved this by making my labels Buttons with a NoBox frame type and setting their callbacks to widget.take_focus() for their associated widgets.
On Tuesday, December 14, 2021 at 10:16:39 AM UTC Mark wrote:
I have a label (a Frame with some text) and a widget beside it (a Spinner). I'd like to have the label have an underlined letter (which in a button is achieved using &Click) but doesn't seem to work in a Frame's label. And when the user presses Alt+C (i.e., Alt+_underlined letter_) sends the keyboard focus to an associated widget.
How is this done in FLTK?
This is fltk-rs I assume, so your "Frame" is what we'd call a box, I believe?
I'm not sure about spinner labels - under C++ I think I'd expect that to just have worked though - but I haven't actually checked! Odd... Oh! The action is on the Frame, not the spinner? Hmm, is the frame basically an Fl_Box with just a label in it? You should still be able to capture events from a Fl_Box though... Using a dummy button sounds like a credible solution here though.
As an aside, I think I'd set the button to Flat_Box rather than NoBox here, as that will ensure the label is less likely to be "damaged" by other refresh actions and so forth.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/ffbdf1e6-b55e-4687-9af0-8623e4528ba5n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |