[Mono-winforms-list] Winforms 'Listview' problem

Paul Berry tall_paulb at hotmail.com
Fri Mar 14 16:28:50 EDT 2008


Is there a known issue with the listview control under mono?  Specifically, in the drawing of the listview?

I have an application that runs fine under .net on windows, but under mono on OS X or Linux it crashes whenever the listview control is redrawn after adding my items to it.

If 'owner draw' is enabled (so the items aren't drawn, but still added) it works fine.  If I'm on a different tab when I add items it works fine...until I switch to the tab with the listview on it.  

This is the error I'm getting:

Unhandled Exception: System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] 
  at System.Drawing.Image.get_Width () [0x00000] 
  at (wrapper remoting-invoke-with-check) System.Drawing.Image:get_Width ()
  at System.Windows.Forms.ImageList+ImageCollection.CreateImage (System.Drawing.Image value, Color transparentColor) [0x00000] 
  at System.Windows.Forms.ImageList+ImageCollection.AddItemInternal (System.Windows.Forms.ImageListItem item) [0x00000] 
  at System.Windows.Forms.ImageList+ImageCollection.CreateHandle () [0x00000] 
  at System.Windows.Forms.ImageList+ImageCollection.GetImage (Int32 index) [0x00000] 
  at System.Windows.Forms.ImageList.Draw (System.Drawing.Graphics g, Int32 x, Int32 y, Int32 index) [0x00000] 
  at System.Windows.Forms.ImageList.Draw (System.Drawing.Graphics g, Point pt, Int32 index) [0x00000] 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.ImageList:Draw (System.Drawing.Graphics,System.Drawing.Point,int)
  at System.Windows.Forms.ThemeWin32Classic.DrawListViewItem (System.Drawing.Graphics dc, System.Windows.Forms.ListView control, System.Windows.Forms.ListViewItem item) [0x00000] 
  at System.Windows.Forms.ThemeWin32Classic.DrawListViewItems (System.Drawing.Graphics dc, Rectangle clip, System.Windows.Forms.ListView control) [0x00000] 
  at System.Windows.Forms.ListView+ItemControl.OnPaintInternal (System.Windows.Forms.PaintEventArgs pe) [0x00000] 
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) [0x00000] 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] 
  at System.Windows.Forms.ListView+ItemControl.WndProc (System.Windows.Forms.Message& m) [0x00000] 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] 
  at System.Windows.Forms.XplatUICarbon.DispatchMessage (System.Windows.Forms.MSG& msg) [0x00000] 
  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG& msg) [0x00000] 
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00000] 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] 
  at WindowsApplication1.Program.Main () [0x00000]

_________________________________________________________________
Share what Santa brought you
https://www.mycooluncool.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20080314/7aa004ce/attachment.html 


More information about the Mono-winforms-list mailing list