radWaitingBarElement Text not visible in some formats

1 Answer 47 Views
WaitingBar
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Mark asked on 03 Aug 2023, 12:02 PM

I am using the example from Customizing RadWaitingBar - RadWaitingBar - Telerik UI for WinForms that DASH Stile.  The problem is, I want to be able to view the text through it. Based on the example code there (attached here), the texted is hidden behind the color bars. The example just above this example on this page that shows the text upside down and right justified, shows the text visible, however, when I take that code an apply it to the lastest telerik release, the text is not visible.   I am sure this is probably a settings I am not setting, Any help would greatly help me here.

Here is a sample screen shot

Here is the code I am using


      private void ShowWaitingBar()
      {
         radWaitingBarElementBase.ShowText = true;
         radWaitingBarElementBase.Text = "Hello World";

         radWaitingBarElementBase.WaitingStyle = Telerik.WinControls.Enumerations.WaitingBarStyles.Dash;
         WaitingBarSeparatorElement dash = radWaitingBarElementBase.SeparatorElement;
         dash.NumberOfColors = 2;
         dash.BackColor = Color.Blue;
         dash.BackColor2 = Color.LightBlue;
         dash.SweepAngle = 45;
         dash.StepWidth = 15;
         dash.SeparatorWidth = 10;
         dash.GradientPercentage = 0.25f;

         radWaitingBarElementBase.StartWaiting();
      }

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 07 Aug 2023, 10:28 AM

Hi Mark,

Thank you for the provided details.

I am assuming that the radWaitingBarElementBase element represents the RadWaitingBar.WaitingBarElement property. Setting the Text property of the WaitingBarElement will be under the dash style. What you can do here is to set the Text property of the RadWaitingBar control, instead.

private void ShowWaitingBar()
{
    this.radWaitingBar1.WaitingBarElement.ShowText = true;
    this.radWaitingBar1.Text = "Hello World";
    // this.radWaitingBar1.WaitingBarElement.Text = "Hello World";

    this.radWaitingBar1.WaitingBarElement.WaitingStyle = Telerik.WinControls.Enumerations.WaitingBarStyles.Dash;
    WaitingBarSeparatorElement dash = this.radWaitingBar1.WaitingBarElement.SeparatorElement;
    dash.NumberOfColors = 2;
    dash.BackColor = Color.Blue;
    dash.BackColor2 = Color.LightBlue;
    dash.SweepAngle = 45;
    dash.StepWidth = 15;
    dash.SeparatorWidth = 10;
    dash.GradientPercentage = 0.25f;

    this.radWaitingBar1.WaitingBarElement.StartWaiting();
}

Check the result below:

I hope that this approach will work for you.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
commented on 07 Aug 2023, 10:39 AM

I am using the WaitingBarElement on the radStatusStrip, not a WaitingBar on the form, which your example, it does work. But on the WaitingBarElement on the radStatusString, it does not. My guess is internally they are the same control, but for what ever reason, behave differently.
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
commented on 07 Aug 2023, 10:42 AM

However, you pointed me in a direction that helped me solve this problem.  I had to update the TextElement.Text on the radWaitingBarElement. Once I did that, I acheived my desired outcome.  Thanks for the push on this one.
Tags
WaitingBar
Asked by
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or