Spread Windows Forms 8.0 Product Documentation
Customizing the Scale Mode

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.

Example

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

C#
Copy Code

fpSpread.SuspendLayout();

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.ScaleMode.ZoomDpiSupport;
fpSpread1.ResumeLayout();

VB
Copy Code

FpSpread1.SuspendLayout()

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.ScaleMode.ZoomDpiSupport
FpSpread1.ResumeLayout()

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback