Skip to main content
Solved

Warning Message: Is it possible to make No button as default in warning message

  • June 24, 2021
  • 2 replies
  • 221 views

Forum|alt.badge.img+2

Hi,

There are three buttons(Yes, No and Cancel) available in  Warning message pop up window. Generally default is Yes. When we press enter key, default Yes button is pressed and action is performed.

Is it possible to make default button as No, so when we press enter key No, button will be pressed and no action will be performed. If user wants he can select Yes button so action will be performed.

 

Regards,

Sauransu

Best answer by Imal Thiunuwan

Hello @TecSauraP,

Yes, This is possible. All you need to change button focus from “OK” button to “No” button. But, please note that you need to apply changes to the relevant .cs file and do some code changes using IFS Developer Studio. Unfortunately, I cannot provide more information as this is based on specific windows and only I can provide a general answer.

Please find below simple sample code example.

 

pbNo.MethodInvestigateState();
    if (pbNo.IsEnabled())
      {
          Sal.SetFocus(pbNo);
      }

 

Hope this helps.

Cheers!

This topic has been closed for replies.

2 replies

Imal Thiunuwan
Superhero (Employee)
Forum|alt.badge.img+16
  • Superhero (Employee)
  • Answer
  • June 24, 2021

Hello @TecSauraP,

Yes, This is possible. All you need to change button focus from “OK” button to “No” button. But, please note that you need to apply changes to the relevant .cs file and do some code changes using IFS Developer Studio. Unfortunately, I cannot provide more information as this is based on specific windows and only I can provide a general answer.

Please find below simple sample code example.

 

pbNo.MethodInvestigateState();
    if (pbNo.IsEnabled())
      {
          Sal.SetFocus(pbNo);
      }

 

Hope this helps.

Cheers!


Forum|alt.badge.img+2
  • Author
  • Do Gooder (Partner)
  • June 24, 2021

Thank You Imam.

 

Regards,

Sauransu