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

Progress Bar and visibility problem

3 Answers 291 Views
ProgressBar
This is a migrated thread and some comments may be shown as answers.
JulioR
Top achievements
Rank 1
JulioR asked on 21 Jan 2008, 04:27 PM
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


3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 22 Jan 2008, 08:41 AM
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
0
JulioR
Top achievements
Rank 1
answered on 22 Jan 2008, 09:14 AM
It works!

Thank you very much!

Julio
0
TwoLaJit
Top achievements
Rank 2
answered on 17 May 2009, 08:14 AM
This was helpful, this issue was driving me nuts. Glad to see there was a workaround
Tags
ProgressBar
Asked by
JulioR
Top achievements
Rank 1
Answers by
Peter
Telerik team
JulioR
Top achievements
Rank 1
TwoLaJit
Top achievements
Rank 2
Share this question
or