Spread Windows Forms 10.0 Product Documentation > Developer's Guide > Customizing Sheet Interaction > Customizing Interaction with the Overall Component > 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.
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() |