private void Form1_Load(object sender, EventArgs e)
{
fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 0].Value = "abcdefg";
fpSpread1.ActiveSheet.Cells[0, 0].Value = "abc";
// 全ての列ヘッダラベルのWordWrap を無効にします
FarPoint.Win.Spread.CellType.EnhancedColumnHeaderRenderer ch = new FarPoint.Win.Spread.CellType.EnhancedColumnHeaderRenderer();
ch.WordWrap = false;
fpSpread1.ActiveSheet.ColumnHeader.DefaultStyle.Renderer = ch;
}
private void button1_Click(object sender, EventArgs e)
{
fpSpread1.ActiveSheet.Columns[0].Width = fpSpread1.ActiveSheet.GetPreferredColumnWidth(0);
}
private void button2_Click(object sender, EventArgs e)
{
fpSpread1.ActiveSheet.Columns[0].Width = fpSpread1.ActiveSheet.Columns[0].GetPreferredWidth();
}
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
FpSpread1.ActiveSheet.ColumnHeader.Cells(0, 0).Value = "abcdefg"
FpSpread1.ActiveSheet.Cells(0, 0).Value = "abc"
' 全ての列ヘッダラベルのWordWrap を無効にします
Dim ch As New FarPoint.Win.Spread.CellType.EnhancedColumnHeaderRenderer
ch.WordWrap = False
FpSpread1.ActiveSheet.ColumnHeader.DefaultStyle.Renderer = ch
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FpSpread1.ActiveSheet.Columns(0).Width = FpSpread1.ActiveSheet.GetPreferredColumnWidth(0)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
FpSpread1.ActiveSheet.Columns(0).Width = FpSpread1.ActiveSheet.Columns(0).GetPreferredWidth()
End Sub