ActiveReports 12
Customize the Viewer ToolStrip
ActiveReports 12 > ActiveReports User Guide > Viewing Reports > Windows Forms > Customize the Viewer ToolStrip

There are a number of ways in which you can customize the Viewer control to make it a perfect fit for your Windows application. You can add and remove buttons from the toolbars, add and remove menu items, create custom dialogs, and call them from custom click events.

You can use the methods listed in the System.Windows.Forms.ToolStripItemCollection documentation on MSDN to customize each ToolStrip.

ToolStrip

TheToolStrip contains the following ToolStripItems by index number.

You can access these ToolStripItems by index with the Insert and RemoveAt methods. Other methods, including Add and AddRange, are described in the System.Windows.Forms.ToolStripItemCollection documentation on MSDN.

ToolStrip Implementation

When you add a new item to a ToolStrip, you need to add an ItemClicked event handler and an ItemClicked event for the ToolStrip with the new item. At run time, when a user clicks the new ToolStrip item, they raise the ItemClicked event of the ToolStrip containing the item

Add the event handler to the Load event of the Form that contains the Viewer control, and use the IntelliSense Generate Method Stub feature to create the related event. For examples of the code to create an event hander, see the Customize the Viewer Control topic, and the Custom Preview sample that is located in ...\Documents\GrapeCity Samples\ActiveReports 12\Section Reports\C#\CustomPreview.

See Also

How To