_LinkLabel.Width = TextRenderer.MeasureText(_LinkLabel.Text, _LinkLabel.Font).Width;
winform设置文本框宽度 根据文字数量和字体返回宽度
原文:http://www.cnblogs.com/shaomingrui/p/3556723.html