有人对如何更改动态创建的字体有任何想法ToolTip
吗?我通常做的Label
是
string arialUnicodeFontFace = "Arial Unicode MS";
Font unicodeFont = new Font(arialUnicodeFontFace, 8);
if (unicodeFont.Name != arialUnicodeFontFace)
unicodeFont = new Font("NSimSun", 8);
Label lbl = new Label();
lbl.Font = unicodeFont;
for (int x = 0; x < dt.Rows.Count; x++)
{
TextBox txt = new TextBox();
txt.Name = dt.Rows[x]["field_name"].ToString();
txt.Width = 200;
txt.Height = 10;
ToolTip tooltip = new ToolTip();
foreach (DataRow row in dtchnge.Rows)
{
if (dt.Rows[x]["definition"].ToString() == row["term"].ToString())
{
tooltip.SetToolTip(txt, row["language_based_term"].ToString());
}
}