on 07-07-2009 2:32 AM
Dear all,
We implemented the pop-up of confirmation dialog box with 'YES' and 'NO' options on click of a particular button.
But, by default the focus is on 'YES' button.
How to change the focus to 'NO' button ?
Please help me.
Hi,
Try this:
IWDControllerInfo controllerInfo =
wdControllerAPI.getViewInfo().getViewController();
String dialogText = "Confirm Deletion";
IWDConfirmationDialog dialog =
wdComponentAPI.getWindowManager().createConfirmationWindow(
dialogText,
controllerInfo.findInEventHandlers("YES"),
"Yes");
dialog.addChoice(
controllerInfo.findInEventHandlers("NO"), "No",true);
// calling the addChoice method which has three arguments addChoice(IWDEventHandlerInfo eventHandler, java.lang.String label, boolean enabled)
dialog.open();
Regards,
Jaya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Wai,
The simple solution would be just to add the No button before the yes button. The code would look like this:
IWDControllerInfo controllerInfo =
wdControllerAPI.getViewInfo().getViewController();
String dialogText = "Confirm Deletion";
IWDConfirmationDialog dialog =
wdComponentAPI.getWindowManager().createConfirmationWindow(
dialogText,
controllerInfo.findInEventHandlers("NO"),
"No");
dialog.addChoice(
controllerInfo.findInEventHandlers("YES"), "Yes");
dialog.open();
and then create two eventhandlers for Yes and No.
I hope this helps.
Thanks and Regards
Pravesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.