Change property of radelement in radstatusstrip during runtime

2 posts, 0 answers
  1. Wesley
    Wesley avatar
    1 posts
    Member since:
    Jan 2015

    Posted 19 Jan 2015 Link to this post

    Hi,

    I have to 2 RadLabelElement in my RadStatusStrip. assuming the name RadLabelElement1 and RadLabelElement2. when the application load, the RadLabelElement2 text is ready. when the condition become login, i want to make RadLabelElement2 text become "login" and there's an image on the left side in the RadLabelElement2. How do i make it like that. thanks

    Best regards,

    Wesley
  2. Todor Vyagov
    Admin
    Todor Vyagov avatar
    31 posts

    Posted 21 Jan 2015 Link to this post

    Hello Wesley,

    Thank you for writing.

    You can set your label text and image at run time, for example upon a button click like this:
    private void radButton1_Click(object sender, EventArgs e)
    {
        radLabelElement2.TextImageRelation = TextImageRelation.ImageBeforeText;
        radLabelElement2.Text = "Login";
        radLabelElement2.Image = Resources.Image1;
    }

    I hope this helps.

    Regards,
    Todor
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top