SftPrintPreview/DLL 1.0

Built-In Tool Bar

Softel vdm, Inc.

SftPrintPreview/OCX offers a built-in tool bar to allow the end-user to customize the current Print Preview.

The tool bar components offer ToolTip help when the mouse cursor rests over the item. 

The tool bar and ToolTip text is customizable and can be translated into other languages (see National Language Support).

Some of the tool bar buttons can be hidden (see WantCloseButton, WantHelpButton and WantPageSetupButton properties), if they are not needed by an application.

The entire tool bar can be hidden using the Toolbar property, if an application wishes to implement its own tool bar.  This may be desirable if achieving the same, consistent look across the entire application is necessary.

The Print Preview control by default allows the display of 1 through 64 pages at one time.  The end-user can select the exact number of pages using the "Multiple Pages" button.  By clicking on the drop down portion, a grid appears where the number of rows and pages per row can be selected.  Some applications may want to limit the maximum number of pages, particularly if rendering the output can be time consuming.  The maximum number of pages is defined using the MaxPageRows and MaxPageGroups properties.

Input

Description

Zoom Factor

Allows entry of a zoom factor value between 10 and up to the maximum defined using the MaxZoom property.  The default maximum value is 1000%.

Zoom In

Increases the zoom factor by the value defined using the ZoomIncrDecr property.  The default value is 100%.  If multiple pages are currently displayed, only the current page will be displayed, at the specified zoom factor.

Zoom Out

Decreases the zoom factor by the value defined using the ZoomIncrDecr property.  The default value is 100%.  If the resulting zoom factor is 0%, multiple pages are displayed.

Single Page

Switches to single page mode, setting a zoom factor suitable to show the entire current page in the available display area.

Multiple Pages

Clicking this button, will increase the currently displayed number of pages, going from one page to 1 x 2, 2 x 4, 3 x 6, 4 x 8, 5 x 10, 6 x 12, back to one page.

Multiple Pages
(Drop down button)

Displays a grid, allowing selection of the exact number of pages (rows and columns) to be displayed.

Current Page

Allows entry of the selected page number.  Page numbering starts at 1. 

Previous Page 

Makes the previous page the new current page.

Next Page 

Makes the next page the new current page. 

Page Setup 

The PageSetupWanted event occurs when the user clicks on the Page Setup button.  The Page Setup dialog is not automatically invoked.

Print Setup

The Print Setup dialog is automatically invoked. 

Print 

The Print dialog is automatically invoked.  

Help 

The HelpWanted event occurs when the user requests online help.  

Close Print Preview 

The CloseWanted event occurs when the users requests to close the Print Preview control window. 

If Windows XP themes are enabled and available (see UseThemes property), the tool bar will be rendered using Windows themes and the user-defined background color (see ToolbarColor property) is ignored.

The control colors and button images cannot be customized.  If detailed customization is required, an application can implement its own tool bar.

Handling Tool Bar Events

Most components of the tool bar automatically perform the desired action, such as zooming in/out, displaying the selected page(s), etc.  A few components will generate events which must be handled by the application, so the application can respond to the requested action.  The events generated by the "Page Setup", "Print" and "Help" buttons must be handled, otherwise these buttons have no effect.

Applications handle the following events:

CloseWanted Event

The CloseWanted event occurs when the users requests to close the Print Preview control window.

HelpWanted Event

The HelpWanted event occurs when the user requests online help.

PageSetupWanted Event

The PageSetupWanted event occurs when the user requests the Page Setup dialog.


Feedback / comments / error reports for this topic
© 2004 - Softel vdm, Inc. - www.windowscontrols.com