Default button in dialog

Is it possible to make a button the default one in a dialog created with application.showFormInDialog?
So that when the user hits the method of this button will run?

yep, give the button a name like: button1

make a method: elements.button1.requestFocus()

and attach this button on the onShow property of the form!

This doesn’t work on my Mac (OSX 10.2.8). On Win XP it does, but when there are options or fields to fill in the dialog, the button looses focus.

I’m looking for something that doesn’t use the focus method.

Thank you anyway for thinking with me.

Ah, you want to first fill in some data and stuff and than hit the ENTER button.
On WinXP this is’nt working too!
I think it is not possible yet!

Hi there,

Can somebody from Servoy comment on this feature (I think a very useful one).

Thank you
Pavel

I would like to have this feature.

how would you define it which buttons must be the default?
in the showFormInDialog call?

Hello there,

Well, I was thinking it would be defined on the form itself, not in a showFormInDialog call.

Thanks
Pavel

but for a form itself it doesn’t make any sense (it only makes sense in a dialog not in the main form)
Will look if we can do it somehow..