01-04-2012, 10:24 AM
Hi, everybody, Happy new year.
I want to move focus to the TextField in the parent while Dialog is displaying with non modal mode.
But before the Dialog object closes, it's impossible to move focus to the TextField.
How can I move focus to it?
I want to move focus to the TextField in the parent while Dialog is displaying with non modal mode.
But before the Dialog object closes, it's impossible to move focus to the TextField.
How can I move focus to it?
Code:
{curl 7.0 applet}
{curl-file-attributes character-encoding = "utf8"}
{def f = {TextField}}
{def dlg = {Dialog
{CommandButton
label="Move to focus",
{on Action do
{f.request-key-focus}
}
}
}
}
{spaced-vbox
f,
{CommandButton
label="Show dialog",
{on Action do
{dlg.show title="Focus Test", modal?=false}
}
}
}