Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
MessageDialog SetFocus? |
Wed, Nov 23 2016 10:12 PM | Permanent Link |
Trinione | As I migrate users onto the EWB web browser app I have noticed they keep hitting 'Enter' when ever the Message Dialog pops up. They do so thinking the Message Dialog has focus on the 'Ok' button as in their Windows apps I suppose.
Is there any way to SetFocus on the 'Ok' button so they do not have to reach for the mouse, move if about and then click on it? |
Thu, Nov 24 2016 1:36 AM | Permanent Link |
Michael Dreher | Trinione wrote:
// Is there any way to SetFocus on the 'Ok' button so they do not // have to reach for the mouse, move if about and then click on it? You can use the DefaultButton parameter in the MessageDialog procedure to set the focus. MessageDlg( 'Are you sure that you want to delete this record?', 'Please Confirm', mtConfirmation, [mbOK], mbOK); // <<--------------- Michael Dreher |
Sat, Dec 17 2016 8:45 AM | Permanent Link |
Trinione | Michael Dreher wrote:
<<< You can use the DefaultButton parameter in the MessageDialog procedure to set the focus. MessageDlg( 'Are you sure that you want to delete this record?', 'Please Confirm', mtConfirmation, [mbOK], mbOK); // <<--------------- >>> No. That does not work in EWB. The focus is not set to the OK button. |
Sat, Dec 17 2016 1:49 PM | Permanent Link |
Raul Team Elevate | On 12/17/2016 8:45 AM, Trinione wrote:
> No. That does not work in EWB. The focus is not set to the OK button. It seems work fine here - tried this: MessageDlg('Delete record ?', 'Confirm Delete',mtConfirmation,[mbOK],mbOK); and this MessageDlg('Delete record ?', 'Confirm Delete',mtConfirmation,[mbOK,mbCancel],mbOK); And in all cases OK has focus and i can hit Enter to dismiss it. in case of OK,Cancel button and i can also hit tab to move to cancel and hit enter to dismiss that way. Tried IE, Chrome and Firefox and all work ok. In my case i'm calling MessageDlg from button clock handler. Where are you calling the MessageDlg from ? Because of async nature of the EWB/JS any chance you have some other code running after that somehow messaes with focus. Raul |
Sat, Dec 17 2016 3:08 PM | Permanent Link |
Trinione | Thank you both. It does indeed work as advertised.
The issue is for form based animation I have to turn AutoFocus off. That's why it cannot set the focus in the message dialog. |
This web page was last updated on Thursday, April 18, 2024 at 10:42 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |