c# 如何让tooltip显示文字换行

在代码中可以,Environment.NewLine
如:
public string GetCheckNote(string plantext)
        {
            string checknote = "";
            string sql = "SELECT Checker,CheckNote FROM emsCheckPlanRecordCheck WHERE PlanText=@PlanText  order by lastedited asc";
            SqlParameter[] pars = 
                    { 
                        new SqlParameter("@PlanText",SqlDbType.NVarChar)
                    };
            pars[0].Value = plantext;
            DataSet set = !CommonWebDataServer.CheckServer() ? GetDataSet(sql, pars, CommonWebDataServer.ChLoginServerStr()) : GetDataSet(sql, pars);
            if (set != null && set.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow row in set.Tables[0].Rows)
                {
                    checknote += row["Checker"].ToString() + ":" + row["CheckNote"].ToString() + Environment.NewLine;
                }
            }
            checknote = !string.IsNullOrEmpty(checknote) && checknote.EndsWith(Environment.NewLine) ? checknote.Substring(0, checknote.Length - 1) : checknote;
            return checknote;
        }
原文地址:https://www.cnblogs.com/soundcode/p/2550456.html