private FontDialog MyFont;
private void toolStripButton3_Click(object sender, EventArgs e)
{
MyFont = new FontDialog();
MyFont.ShowApply = true;
MyFont.Font = this.toolStripComboBox1.Font;
MyFont.Apply += new System.EventHandler(MyFont_Apply);
if (MyFont.ShowDialog() != DialogResult.OK)
{
this.fpSpread1.ActiveSheet.SelectionFont = MyFont.Font;
}
}
private void MyFont_Apply(object sender, System.EventArgs e)
{
this.toolStripComboBox1.Font = MyFont.Font;
}我是这么写的,但是不能改变选中的单元格的字体,求指导,谢谢啦! |
|