在编辑结束之后,重新获取行高并设置。
- FarPoint.Win.Spread.Row row;
- FarPoint.Win.Spread.Column col;
- float sizerow;
- float sizercol;
- row = fpSpread1.ActiveSheet.Rows[0];
- col = fpSpread1.ActiveSheet.Columns[0];
- fpSpread1.ActiveSheet.Cells[0, 0].Text = "This text is used to determine the height and width.";
- sizerow = row.GetPreferredHeight();
- sizecol = col.GetPreferredWidth();
- row.Height = sizerow;
- col.Width = sizecol;
复制代码 |