Skip to Content
avatar image
Former Member

How can we enable or disable an action button?

Hi,

Can any one please suggest as to how to enable or disable Action Button dynamically without binding the "Enable" property of a the button to a context attribute?

Thanks and Regards,

Smriti

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 09, 2007 at 05:32 PM

    Either you can disable the action itself (which will disable all UI elements using this action automatically) or bind the "enabled" property of the UI element to a boolean context attribute and set the attribute value to "false".

    Armin

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Armin,

      Thanks for your reply. How can we disable the action itself? Can you please provide the code snippet?

      Regards,

      Smriti.

  • Aug 09, 2007 at 05:36 PM

    Hi Smriti,

    When you create a Button you must to assign a action to this button. Enabling or disabling this action will disabe the button. you can do this by code:

    You have a action called Cancel

    wdThis.wdGetCancelAction().setEnabled(true/false);

    Regards,

    Luciano

    Add comment
    10|10000 characters needed characters exceeded