Progress Bar and visibility problem

4 posts, 0 answers
  1. JulioR
    JulioR avatar
    26 posts
    Member since:
    Dec 2006

    Posted 21 Jan 2008 Link to this post

    Hi,

    I'm trying to work with the new control but with some problems related with the radProgressBarElement item (Visibility property).

    When I set the Visibility property to Hidden, and then resize the form, the progress bar appear again. I have test this on your sample application for the status bar. I have solved this problem with the SizeChanged event on the main form. On the other hand, each time I try to hidde the progress bar item is not working  well (it is hidden and suddenly is visible again). Do you have any idea about this wrong behaviors?

    Regards,

    Julio


  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 22 Jan 2008 Link to this post

    Hi JulioR,

    Thank you for writing.

    This issue comes from logic in the RadStatusStrip.

    There are two ways to avoid this behavior:

        1. Change RadStatusStrip property to Overflow mode as shown below:

            this.radStatusBar1.LayoutStyle = RadStatusBarLayoutStyle.Overflow;

        2. Remove ProgressBar from RadStatusStrip items collection as shown below:

            RadItem progessBar;
            void HideProgressBar()
            {
                        this.progessBar = this.radStatusBar1.Items[5]; //#5 is ProgressBar
                        this.radStatusBar1.Items.RemoveAt(5);
            }

            void ShowProgressBar()
            {
                        if (!this.radStatusBar1.Items.Contains(this.progessBar))
                        this.radStatusBar1.Items.Insert(5, this.progessBar);
            }

    I hope this helps. If you have any additional questions, please let me know.

    Regards,
    Peter
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. JulioR
    JulioR avatar
    26 posts
    Member since:
    Dec 2006

    Posted 22 Jan 2008 Link to this post

    It works!

    Thank you very much!

    Julio
  5. TwoLaJit
    TwoLaJit avatar
    38 posts
    Member since:
    Nov 2006

    Posted 17 May 2009 Link to this post

    This was helpful, this issue was driving me nuts. Glad to see there was a workaround
Back to Top