5.2. Zooming

In most cases you probably do not need the zooming feature. We highly recommend that you make sure that the ZoomRatio equals to 1.0 when you print the barcode. This zooming feature is provided for creating comprehensive labeling applications.

To avoid confusion, this manual defines two sizes here: natural size and display size. The natural size is the size of the control itself without scaling. The display size is the natural size multiplies the zoom ratio.

There are two types of zooming: programmed and interactive. In the first scenario, the control size is determined by the actual size and ZoomRatio. The program changes the control size by programmatically modifying the ZoomRatio. In the latter case, the user drags on the tracker box to the size desired, and the object responds by drawing itself to the maximum extent in the box specified. Although you can switch from one to the other zooming mode, you can not have both at the same time. The zoom mode is determined by property AutoSize: if this property is set to TRUE, the control determines the size and you can programmatically zoom the control by setting the ZoomRatio property to an appropriate value. If AutoSize is set to FALSE, the container takes the charge and the control redraws itself every time the container's size changes (with several extra lines of code you will be able to achieve the interactive dragging effect). Under the interactive mode you can not set ZoomRatio property; it becomes read-only.

Figure 5.1. Zooming effect

Zooming effect