Solved

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

  • 24 June 2021
  • 2 replies
  • 180 views

Badge +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

icon

Best answer by Imal Thiunuwan 24 June 2021, 10:31

View original

This topic has been closed for comments

2 replies

Userlevel 6
Badge +16

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!

Badge +2

Thank You Imam.

 

Regards,

Sauransu