Divelements Community
Customer discussion of all Divelements products

Crash in 2003 renderer when a button is invisible.

Latest post 04-20-2007 11:04 by Tim Dawson. 1 replies.
  • 04-12-2007 23:00

    • liz
    • Top 200 Contributor
    • Joined on 11-24-2006
    • Posts 7

    Crash in 2003 renderer when a button is invisible.

    I am getting this crash in my application when an entire toolbar is disabled.  What seems to be a contributory factor is that there is one button on the toolbar that is marked as visible = false at the time when the toolbar is disabled.

    Looking through the posts for the various controls there seemed to have been a very similar crash in SandDock a while back.

    http://community.divelements.co.uk/CS/forums/10516/ShowPost.aspx

    I am  currently using SandBar 1.3.4.1, but I have verified 1.4 as well, and I can reproduce the same problem.

      ************** Exception Text **************

    System.ArgumentException: Rectangle '{X=0,Y=0,Width=0,Height=0}' cannot have a width or height equal to 0.
       at System.Drawing.Drawing2D.LinearGradientBrush..ctor(Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode)
       at TD.SandBar.Office2003Renderer.DrawButtonHighlight(Graphics graphics, Rectangle bounds, DrawItemState state, Boolean dropDown)
       at TD.SandBar.OfficeRendererBase.DrawToolBarItem(ToolbarItemBase item, Graphics graphics, Font font, Boolean vertical, DrawItemState state, ToolBarTextAlign textAlign)
       at TD.SandBar.ToolbarItemBase.Paint(IToolBarRenderer renderer, Graphics graphics, Font font, Boolean vertical, Boolean rtl, ToolBarTextAlign textAlign, DrawItemState state)
       at TD.SandBar.ToolBar.
    (IToolBarRenderer , Graphics , ToolbarItemBase , Boolean , Boolean , Boolean )
       at TD.SandBar.ToolBar.OnPaint(PaintEventArgs e)
       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 TD.SandBar.ToolBar.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)

  • 04-20-2007 11:04 In reply to

    Re: Crash in 2003 renderer when a button is invisible.

    Unfortunately I haven't been able to reproduce this here on our test machine. I have a toolbar with a single item (set to invisible) and I disable the toolbar. Nothing happens.

    Would you mind sending a simple repro project so we can debug it?

    Thanks.
Page 1 of 1 (2 items) | RSS
Copyright © 2008 Divelements Limited
Powered by Community Server (Commercial Edition), by Telligent Systems