Spread Windows Forms 9.0 Product Documentation > Developer's Guide > Customizing Row, Column, and Cell Appearance > Customizing the Appearance of a Cell > Allowing Cell Data to Overflow |
You can determine how the contents of a cell or a group of cells overflow into adjoining cells. If you allow cell contents to overflow:
An example of each of these is shown in the following figure.
To set the overflow behavior, use the following members for the overall component (FpSpread class) or the child sheet (SpreadView class):
You can specify the amount of content that will overflow into adjacent cells by specifying the number of pixels of overflow allowed using the SetMaximumCellOverflowWidth method.
For more information on cell contents alignment, refer to Aligning Cell Contents.
This example code sets the component to allow cells to overflow but only up to the maximum of 130 pixels.
C# |
Copy Code
|
---|---|
fpSpread1.AllowCellOverflow = true;
fpSpread1.SetMaximumCellOverflowWidth(130);
|
VB |
Copy Code
|
---|---|
FpSpread1.AllowCellOverflow = True
FpSpread1.SetMaximumCellOverflowWidth(130)
|
This example code sets the child sheet to allow cells to overflow up to a maximum width of 130.
C# |
Copy Code
|
---|---|
FarPoint.Win.Spread.SpreadView sv = fpSpread1.GetRootWorkbook();
sv.AllowCellOverflow = true;
sv.SetMaximumCellOverflowWidth(130);
|
VB |
Copy Code
|
---|---|
Dim sv As FarPoint.Win.Spread.SpreadView = FpSpread1.GetRootWorkbook sv.AllowCellOverflow = True sv.SetMaximumCellOverflowWidth(130) |