-1

我可以快速创建已安装字体的列表(顺便将字体加载到 TabStripDropDownButton 中需要很长时间),但我宁愿有一个显示 FontDialog 的 ToolStrip 按钮。有人知道这样做的开源或商业控制或样本吗?我找不到任何东西。

4

2 回答 2

1

Recommending a software library is off-topic, but to just show the built-in font provider, you can just use the FontDialog class:

using (FontDialog fd = new FontDialog()) {
  if (fd.ShowDialog(this) == DialogResult.OK) {
    textBox1.Font = fd.Font;
  }
}

The windows FontDialog form won't win any design awards.

You can also consider caching the font list after it's created the first time and just load that on subsequent openings.

于 2015-02-19T18:10:32.863 回答
0

我想太多了,我想完成什么。因此,正如建议的那样,我只是使用 ToolStrip 上的按钮中的 FontDialog。很抱歉浪费了人们的时间。

于 2015-02-19T19:25:27.783 回答