requestfocus bug?

I have the following method:

elements.adres.requestFocus();

When switching from Designer to browse mode and than start the method manually everything works fine.
When I put the method onLoad on the same form, It won’t start! Bug?

try using “onShow” method. (executes every time form shows)

“onLoad” only executes the first time it’s shown after solution is started.

Oke that works!, but try to show the same form in a dialog!
Then the onshow-method won’t start.

Is there a workaround??

What should your “onShowMethod” do?

I just tested with a simple setfield, and that works.

I’m not quit sure what you mean!

What I want to achieve is that if I open a form in a Dialog, I want that my cursor begins in the first field.

How?

Couple of questions:

What’s the view(record/list etc..) of the form you’re opening in the Dialog?
What kind of field(global, column) do you want to focus on?
In which part(header, body etc) is it positioned?

What’s the view(record/list etc..) of the form you’re opening in the Dialog?

answer: View as record

What kind of field(global, column) do you want to focus on?

answer: global field called: name

In which part(header, body etc) is it positioned?

answer: In the body part!

Seems that requestFocus doesn’t work properly within FormDialog.
I’ve posted bugreport to dev. team.

Thanks.

request focus handling should be much better in builds after RC4
(every where so not only FormDialog)