All Products
Search
Document Center

Intelligent Media Management:Show or hide components

Last Updated:Oct 29, 2024

Configure the Visible parameter to show or hide specified components. This topic describes how to show or hide a component by using the More Menus button as an example.

  • Demonstration

    • Hide the button隐藏

    • Show the button显示

  • Syntax

    Expression.CommandBars(CommandBarId).Visible

    Expression: the document type application object.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the More Menu button for page customization.
      const moreMenus = await app.CommandBars('MoreMenus');
    
      // Hide the More Menu button.
      moreMenus.Visible = false;
    
      // Obtain the status of the More Menu button.
      const visible = await moreMenus.Visible;
      console.log(visible);
    }