Alvin wrote:

> I think I
> need to investigate this a little more.

The problem of the Fl_Input losing focus when free space on the window is
clicked has been resolved.

My problem now is that when the dialog appears, I would like the whole text
to be selected. I think I have a simple example that shows what I'm talking
about.

Compile:
$ fluid -c inputtest.fl
$ fltk-config --use-images --compile inputtest.cxx

When the program starts, click the big button to open the dialog (a
Fl_Double_Window). When the dialog appears, the text in "Input1" should be
all selected. The code for selecting the text is part of the callback for
the button.

If I add MyDialog::show() as follows:

void MyDialog::show()
{
   textbox1->position(0, textbox1->size());
   textbox1->take_focus();

   Fl_Double_Window::show();
}

The text isn't highlight when the dialog is first shown, but if the mouse is
clicked on anywhere on the dialog, the text gets selected. This relates to
my other post "Fl_Double_Window::show()" in that the overridden show()
seems to be called for every click (on free space).

-- 
Alvin
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to