关闭

向panel中添加linklable

248人阅读 评论(0) 收藏 举报

http://www.cnblogs.com/shengzh/archive/2011/01/20/1939861.html

 

#region 添加消息列
/// <summary>
       
/// 添加消息列
       
/// </summary>
        private void GetLinkLable()
        {
           
try
            {               
               
string user = " and 员工编码=" + TaskNotifier.currentEmployee.EmployeeCode.ToString();
                IList
<WEC.HR.KaoQin.GoingToDo> list = WEC.HR.KaoQin.GoingToDo.LoadGoingToDo(user);
               
int count = list.Count;
               
int top = 10;
               
int left = 5;              
               
for (int i = 0; i <count; i++)
                {
                    LinkLabel linklabel
= new LinkLabel();
                    linklabel.Name
= "linklabel" + (i+1).ToString();
                    linklabel.Text
= list[i].标题 + "  " + list[i].发件人 + "  "+list[i].开始日期;
                    linklabel.Left
= left;                   
                    linklabel.Top
= i * (top + 11);
                    linklabel.Width
= 200;
                    linklabel.LinkBehavior
= LinkBehavior.HoverUnderline;                   
                    linklabel.Visible
= true;                   
                   
this.panel1.Controls.Add(linklabel);                   
                }
            }
           
catch (Exception ex)
            { ; }
        }
       
#endregion

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:118241次
    • 积分:1462
    • 等级:
    • 排名:千里之外
    • 原创:0篇
    • 转载:163篇
    • 译文:0篇
    • 评论:14条
    文章存档
    最新评论