Menu

#42 Resizing Checkbox Cell To zero raises exception

open
nobody
None
5
2008-07-25
2008-07-25
Dancer42
No

When a Checkbox cell is resized To zero an exception is raised on:
Viewbase.cs at:
SourceGrid.Cells.Views.ViewBase.DrawCell()
In the function call:
Draw(graphics, rectangle);

Exception Detail:
System.ArgumentException was unhandled
Message="Parameter is not valid."
Source="System.Drawing"
StackTrace:
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at System.Windows.Forms.ControlPaint.DrawFrameControl(Graphics graphics, Int32 x, Int32 y, Int32 width, Int32 height, Int32 kind, Int32 state, Color foreColor, Color backColor)
at System.Windows.Forms.ControlPaint.DrawCheckBox(Graphics graphics, Int32 x, Int32 y, Int32 width, Int32 height, ButtonState state)
at System.Windows.Forms.ControlPaint.DrawCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state)
at DevAge.Drawing.VisualElements.CheckBox.OnDraw(GraphicsCache graphics, RectangleF area)
at DevAge.Drawing.VisualElements.VisualElementBase.Draw(GraphicsCache graphics, RectangleF area, RectangleF& drawingArea)
at DevAge.Drawing.VisualElements.VisualElementBase.Draw(GraphicsCache graphics, RectangleF area)
at DevAge.Drawing.VisualElements.CheckBoxThemed.OnDraw(GraphicsCache graphics, RectangleF area)
at DevAge.Drawing.VisualElements.VisualElementBase.Draw(GraphicsCache graphics, RectangleF area, RectangleF& drawingArea)
at DevAge.Drawing.VisualElements.ContainerBase.OnDrawContent(GraphicsCache graphics, RectangleF area)
at DevAge.Drawing.VisualElements.ContainerBase.OnDraw(GraphicsCache graphics, RectangleF area)
at DevAge.Drawing.VisualElements.VisualElementBase.Draw(GraphicsCache graphics, RectangleF area, RectangleF& drawingArea)
at DevAge.Drawing.VisualElements.VisualElementBase.Draw(GraphicsCache graphics, RectangleF area)
at SourceGrid.Cells.Views.ViewBase.DrawCell(CellContext cellContext, GraphicsCache graphics, RectangleF rectangle) in C:\C#\SourceGrid4_11\SourceGrid\Cells\Views\ViewBase.cs:line 216
at SourceGrid.GridVirtual.PaintCell(GraphicsCache graphics, CellContext cellContext, RectangleF drawRectangle) in C:\C#\SourceGrid4_11\SourceGrid\Grids\GridVirtual.cs:line 1418
at SourceGrid.Grid.PaintCell(GraphicsCache graphics, CellContext cellContext, RectangleF drawRectangle) in C:\C#\SourceGrid4_11\SourceGrid\Grids\Grid.cs:line 519
at SourceGrid.GridVirtual.OnRangePaint(RangePaintEventArgs e) in C:\C#\SourceGrid4_11\SourceGrid\Grids\GridVirtual.cs:line 1382
at SourceGrid.Grid.OnRangePaint(RangePaintEventArgs e) in C:\C#\SourceGrid4_11\SourceGrid\Grids\Grid.cs:line 511
at SourceGrid.GridVirtual.OnPaint(PaintEventArgs e) in C:\C#\SourceGrid4_11\SourceGrid\Grids\GridVirtual.cs:line 1342
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.ScrollableControl.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at AB.Program.Main() in C:\C#\AB\AB\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.