Hi. I have main window which has input in it, and it should as soon as
something is typed in the input box, popup new borderless window (child of
main) with browser in it, with that what is typed in input box added in
browsers.
When I type the first character in input box, child window with browser in it,
which added that character, pops up but focus is not on input anymore, so I
have to click on input and continue typing after which focus stays on input.
But how can I prevent losing focus even that first time (after first typed
character), because it is expected that user should continuously type the
whole word in input box, not first one character and then switch manually to
input again and continue typing?
I'm using FLTK 2.x and piece of code in question is bellow:
--- Begin ---
void MainWindow::cb_wordInput_i() { // callback, called "WHEN_CHANGED"
// wordInput is fltk::Input
if (wordInput->size()) {
browser->add(wordInput->value());
browserWindow->show();
wordInput->take_focus(); // I've tried and focus(wordInput)
// also, from <fltk/events.h>
} else {
browser->clear();
browserWindow->hide();
}
}
--- End ---
Thanks in advance.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk