Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Track / Progress / Waiting / Scroll Bars > Proper way to add text to waitbar with radlabel.

Answered Proper way to add text to waitbar with radlabel.

Feed from this thread
  • Jose Mejia avatar

    Posted on Jul 21, 2010 (permalink)

    Hello.

    I know that there is no (for now) possibility to add text to waitingbar so I did some workaround for this:

    var label = new RadLabel();
    label.Text = "some test";
    label.TextAlignment = ContentAlignment.MiddleRight;
     
     
    waitingBar.EnableTheming = true;
    waitingBar.RootElement.ElementTree.ThemeName = "Breeze";
    waitingBar.WaitingBarElement.Value = 0;
    waitingBar.Controls.Add(label);

    But it looks ugly and also waitingbarelement is mostly hidden by the text.
    Maybe I'm doing something wrong? Maybe there is better workaround.

    thanks

    Reply

  • Answer Martin Vasilev Martin Vasilev admin's avatar

    Posted on Jul 26, 2010 (permalink)

    Hi Jose Mejia,

    Thank you for writing.

    Actually, it would be better if you add a TextPrimitive element instead RadLabel control. Please consider the following code:
    TextPrimitive textElement = new TextPrimitive();
    textElement.Text = this.radWaitingBar1.Name;
    textElement.Alignment = ContentAlignment.MiddleCenter;
    textElement.ZIndex = 100;
    this.radWaitingBar1.WaitingBarElement.Children.Add(textElement);

    I hope this helps. Let me know if you have any additional questions.

    Best wishes,
    Martin Vasilev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Track / Progress / Waiting / Scroll Bars > Proper way to add text to waitbar with radlabel.
Related resources for "Proper way to add text to waitbar with radlabel."

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]