Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
570
@Infragistics - UltraStatusBar & Designer miss-behavior
posted

Hi !

When creating a UltraStatusBar with the Designer(VS2005), the designer creates an local instance in the InitializeComponent method(Form1.Designer.cs)

private void InitializeComponent(){
           ...
            Infragistics.Win.UltraWinStatusBar.UltraStatusBar theStatusBar;

}

But the desinger does not create a file global private member variable like

private  Infragistics.Win.UltraWinStatusBar.UltraStatusBar theStatusBar;

 When trying to manually insert this statement the designer will automaticly delete it.

 => accessing the status bar in the form is not possible

 I build a workaround to acessing the status bar like that:

        public UltraStatusBar GetStatusBar() {
            UltraStatusBar theBar = null;
            if (this.Controls.ContainsKey("StatusBar")) {
                Object[ bars = this.Controls.Find("StatusBar", true);
                if (bars.Length == 1) {
                    theBar = (UltraStatusBar)bars[0];
                }
            }
            return theBar;
        }

Kinds regard,

Claus