Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Clicking a button
Fri, Apr 4 2014 9:14 AMPermanent Link

Matthew Jones

Is there a way to click a button programmatically? I have OK and Cancel, and of
course they work fine with ModalResult etc. And I have used the KeyPreview to spot
the #13 Enter key, and that's worked in the past too. But now I have a key with a
ModalResult and an OnClick that I want to trigger, and I seem to have to call the
btnOkOnClick(btnOk) function, and then set the form ModalResult to the button
ModalResult. In Delphi I can just do btnOK.Click and it does the normal button
processing (including not clicking if it is not enabled). It is trivial, but would
be nice to be able to mimic a user button click from code.

/Matthew Jones/
Fri, Apr 11 2014 3:01 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Is there a way to click a button programmatically? >>

Browsers have limitations on this for certain types of input elements
(files), and so I don't expose the native input element click method
functionality in the framework.  I'll have to see about adding this further
on down in the control hierarchy.

Tim Young
Elevate Software
www.elevatesoft.com
Image