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
2349
Error When Setting Toolbar Tool Enabled
posted

I'm calling this on a timer when the network goes down.  That is, when my time discovers there's no network, it fires an event that disables certain tool buttons.  Any idea what might be happening here?  

 

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Infragistics.Win.UltraWinToolbars.UltraToolbarBase.ToolGroup..ctor(ToolbarMetrics metrics, ToolBase firstVisibleTool)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarBase.ToolbarMetrics.CalculateFloatingMetrics(Size cachedSize, Size delta)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarBase.ToolbarMetrics..ctor(UltraToolbarBase toolbar, Size cachedSize, Size delta)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarBase.GetMetrics(Size cachedSize, Size delta)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarBase.ToolAreaInformation.FromToolbar(UltraToolbarBase toolbar, Rectangle overallArea)
   at Infragistics.Win.UltraWinToolbars.ToolbarUIElement.PositionChildElements()
   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
   at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics)
   at Infragistics.Win.UIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics)
   at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics)
   at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize)
   at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode)
   at Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.OnPaint(PaintEventArgs pe)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Parents
No Data
Reply
  • 37774
    posted

     This looks like it could be a threading issue.  You could try invoking the call to enable the took back to the main thread, assuming that InvokeRequired returns true.

    -Matt

Children
No Data