RadWaitingBar in RadStatusStrip

9 posts, 0 answers
  1. George
    George avatar
    5 posts
    Member since:
    Apr 2008

    Posted 11 Dec 2008 Link to this post

    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).


  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 12 Dec 2008 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. George
    George avatar
    5 posts
    Member since:
    Apr 2008

    Posted 12 Dec 2008 Link to this post

    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


  5. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 15 Dec 2008 Link to this post

    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.
  6. Emilio
    Emilio avatar
    15 posts
    Member since:
    Mar 2012

    Posted 09 May 2012 Link to this post

    Hi,

    do you have vb.net equivalent code?

    Thanks,
  7. Emilio
    Emilio avatar
    15 posts
    Member since:
    Mar 2012

    Posted 09 May 2012 Link to this post

    Hi,

    do you have vb.net equivalent code?

    Thanks,
  8. Emilio
    Emilio avatar
    15 posts
    Member since:
    Mar 2012

    Posted 09 May 2012 Link to this post

    Hi,

    sorry for the double posting, my browser lags
  9. Peter Szintai
    Peter Szintai avatar
    28 posts
    Member since:
    Jul 2009

    Posted 12 May 2012 Link to this post

    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
  10. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 14 May 2012 Link to this post

    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 >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready