Spread Windows Forms 7.0 Product Documentation
Customizing the Scale Mode
Support Options
Spread Windows Forms 7.0 Product Documentation > Developer's Guide > Customizing Sheet Interaction > Customizing Interaction with the Overall Component > Customizing the Scale Mode

Glossary Item Box

You can provide support for the 120 dpi scale mode in Spread with the SpreadScaleMode property. Spread supports resizing rows, columns, cells, and data based on the dpi.

The automatic scaling only occurs when the form is loaded. The scaling can change at run time if there are changes to the control size and location and the container layout is suspended.

For the best results, set the AutoScaleMode property of the container to Dpi when using the ZoomDpiSupport option of the SpreadScaleMode property.

Using Code

  1. Suspend the layout.
  2. Set the location and size for the control.
  3. Set the SpreadScaleMode property to ZoomDpiSupport.
  4. Use the ResumeLayout method to see the changes.


This example sets the SpreadScaleMode property to ZoomDpiSupport and suspends and resumes the layout.

C# Copy Code


AutoScaleDimensions = new System.Drawing.SizeF(96.0F, 96.0F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
fpSpread1.Location = new System.Drawing.Point(23, 86);
fpSpread1.Size = new System.Drawing.Size(356, 161);
fpSpread1.SpreadScaleMode = FarPoint.Win.Spread.FpSpread.ScaleMode.ZoomDpiSupport;

VB Copy Code


AutoScaleDimensions = New System.Drawing.SizeF(96.0F, 96.0F)
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi
FpSpread1.Location = New System.Drawing.Point(23, 86)
FpSpread1.Size = New System.Drawing.Size(356, 161)
FpSpread1.SpreadScaleMode = FarPoint.Win.Spread.FpSpread.ScaleMode.ZoomDpiSupport

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.