ActiveReports 6 Online Help
Customize the FlashViewer Toolbar (Pro Edition)

Show AllShow All
Hide AllHide All

When you select the FlashViewer ViewerType of the WebViewer (Professional Edition license), the FlashViewer toolbar is very similar to the Viewer control's toolbar. You can show or hide it, reorder buttons, remove buttons, add custom buttons, or create a custom toolbar. Use the Web.Controls namespace to create custom buttons or a custom toolbar that you can specify in the WebViewer's FlashViewerToolbar property.

Hide the Toolbar

Reorder Buttons

Remove a Button

Create a Custom Button

Create a Custom Toolbar

The buttons that are available in the toolbar by default are:

  • TOCButton
  • PrintButton
  • PageRangeButton
  • SearchButton
  • ZoomOutButton
  • ZoomBox
  • ZoomInButton
  • SinglePageViewButton
  • MultiPageBox
  • ContinuousViewButton
  • PreviousPageButton
  • NextPageButton
  • CurPageTextArea
  • BackwardButton
  • ForwardButton

    To hide the toolbar

    Note: If the ViewerType property of your WebViewer control is not set to FlashViewer, this code is ignored.
    1. In the Visual Studio Solution Explorer, right-click the ASPX file that contains your WebViewer and select View Designer.
    2. In the design view of your web form, double-click the WebViewer. This creates an event handling method for the Page Load event and takes you to the code view of the page.
    3. Use code like the following to hide the toolbar:

      To write the code in Visual Basic.NET

      To write the code in C#

    To rearrange buttons in the toolbar

    1. In the Visual Studio Solution Explorer, right-click the ASPX file that contains your WebViewer and select View Designer.
    2. In the design view of your web form, double-click the page. This creates an event handling method for the Page Load event and takes you to the code view of the page.
    3. Use code like the following to create a button and insert it at the beginning of the toolbar:

      To write the code in Visual Basic.NET

      To write the code in C#

    To remove a button from the toolbar

    1. In the Visual Studio Solution Explorer, right-click the ASPX file that contains your WebViewer and select View Designer.
    2. In the design view of your web form, double-click the WebViewer. This creates an event handling method for the Page Load event and takes you to the code view of the page.
    3. Use code like the following to remove a button from the toolbar:

      To write the code in Visual Basic.NET

      To write the code in C#

    To create a custom button and add it to the toolbar

    Tip: The ToolsCollection class in the Web.Controls namespace has the standard System.Collections.ObjectModel.Collection methods available, so if you want to just add the button to the end of the toolbar, you can use the Add method instead.
    1. In the Visual Studio Solution Explorer, right-click the ASPX file that contains your WebViewer and select View Designer.
    2. In the design view of your web form, double-click the WebViewer. This creates an event handling method for the Page Load event and takes you to the code view of the page.
    3. Use code like the following to create a button and insert it at the beginning of the toolbar:

      To write the code in Visual Basic.NET

      To write the code in C#

    To create a custom toolbar and add it to the viewer

    1. In the Visual Studio Solution Explorer, right-click the ASPX file that contains your WebViewer and select View Designer.
    2. In the design view of your web form, double-click the WebViewer. This creates an event handling method for the Page Load event and takes you to the code view of the page.
    3. Use code like the following to create a custom toolbar and add it to the viewer:

      To write the code in Visual Basic.NET

      To write the code in C#

    In the Class Library portion of the documentation, you can see all of the available properties and methods in the Web assembly's Controls namespace.

  • See Also

    Getting Started

    Walkthroughs