This is a migrated thread and some comments may be shown as answers.

RadWaitingBar in RadStatusStrip

8 Answers 489 Views
StatusStrip
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 11 Dec 2008, 06:50 PM
Is it possible to add a RadWaitingBar to the RadStatusStrip?   I have a long running operation of unknown duration and the ProgressBar is insufficient (unless there is an equivalent of the Marquee style of Microsoft Progress Bar).


8 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 12 Dec 2008, 05:36 PM
Hello George,

Thank you for the question.

Currently, the correct approach to add RadWaitingBar to RadStatusStrip is to use a RadHostItem to host the RadWaitingBar. Please refer to the following code snippets, for the properties which you should set:
private void Form1_Load(object sender, EventArgs e)  
{  
    RadWaitingBar waitingBar = new RadWaitingBar();  
    waitingBar.BeginInit();  
    waitingBar.MinimumSize = new Size(100, 16);  
    waitingBar.MaximumSize = new Size(100, 16);  
    waitingBar.EndInit();  
    RadHostItem host = new RadHostItem(waitingBar);  
    this.radStatusStrip1.Items.Add(host);  
    waitingBar.StartWaiting();  

In one of our future versions we will make this process much more easier as it is now for the RadProgressBar in RadStatusStrip.

I hope this helps. If you have additional questions, feel free to contact me.

All the best,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
George
Top achievements
Rank 1
answered on 13 Dec 2008, 03:31 AM
Dear Nikolay,
Thank you for the quick reply.   I tried your suggestion, and it works to a fashion, but not quite right.   The code that you suggest places the waitingBar initially to the far right of the statusBar, but only a small portion of the left-hand side of the waiting bar appears.   Also, if you resize the window, the rest of the status bar elements move properly, but he waiting bar seems to stay in place without moving as the window is resized.  

Here is some ASCII art which demonstrates the problem:

|===============(-|     = Upon initiization

|===============(--------)|  = The desired arrangement, which doesn't happen

|===============(--------)=========|  = What does happen when you resize the window, which is wrong.

where:

| = the window bounderies
= = other stuff in the status bar: labels and separators
(----------) = the waiting bar


0
Nikolay
Telerik team
answered on 15 Dec 2008, 03:52 PM
Hello George,

Thank you for getting back to me.

In the case where the Spring property is set to true, it will be best if you add the RadHostItem not directly to the RadStatusStrip, but to one of its elements, for example RadLabelElement. Since the RadStatusStrip's layout respects the RadLabelElement, and in the same time the RadHostItem is in the RadLabelElement, the RadWaitingBar will be correctly placed in the RadStatusStrip.

I am attaching a sample project to demonstrate the correct behavior. If you have additional questions, feel free to contact me.

All the best,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Emilio
Top achievements
Rank 1
answered on 09 May 2012, 02:38 PM
Hi,

do you have vb.net equivalent code?

Thanks,
0
Emilio
Top achievements
Rank 1
answered on 09 May 2012, 02:43 PM
Hi,

do you have vb.net equivalent code?

Thanks,
0
Emilio
Top achievements
Rank 1
answered on 09 May 2012, 02:44 PM
Hi,

sorry for the double posting, my browser lags
0
Peter Szintai
Top achievements
Rank 1
answered on 12 May 2012, 12:49 PM
Hi All!

A few days ago I faced a similar problem, I wanted to place a waitingbar on the status strip. I just read through the manual, and based on it, I made the following trick (hacking?) : I put a radlabelelement on the status strip, then, in the designer code I replaced the type RadLabelElement with RadWaitingBarElement.
Had some problems with the waitingbar height (I had to play with the max size property), but, at the end I can see in design time the waiting bar on the status strip, the code runs fine.

Maybe, it is not an official solution, but it works.

HTH: Peter
0
Peter
Telerik team
answered on 14 May 2012, 02:35 PM
Hello, 

Thank you for contacting Telerik support.

@Emilio
Attached to this post you can find the VB version of the project. For you convenience, you can use our free converter: http://converter.telerik.com/

@Peter
Thank you for sharing your solution with the community.  I have updated your Telerik points for the cooperation.

Do not hesitate to contact us if you have other questions.

All the best,
Peter
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
StatusStrip
Asked by
George
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
George
Top achievements
Rank 1
Emilio
Top achievements
Rank 1
Peter Szintai
Top achievements
Rank 1
Peter
Telerik team
Share this question
or