Re: BUG in ListView - throws exceptions when adding items
From: Tom Dacon (tdacon_at_community.nospam)
Date: 08/17/04
- Next message: Marauderz: "Q : Programmatically Turn Off Screen Display"
- Previous message: Tom Dacon: "Re: Why doesn't setting CurrentUICulture use new culture"
- In reply to: Greg Ennis: "BUG in ListView - throws exceptions when adding items"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 16 Aug 2004 17:02:35 -0700
This isn't the only problem that EnableVisualStyles can give you. Consider
doing your visual styles the 'old-fashioned way', with a manifest.
I hope that MS does some work on EnableVisualStyles for the next release or
service pack.
Tom Dacon
Dacon Software Consulting
"Greg Ennis" <GregEnnis@discussions.microsoft.com> wrote in message
news:8896CBE7-103B-4983-8534-4FC05DFA7C37@microsoft.com...
> There is a bug with the ListView control which is revelead when calling
> Application.EnableVisualStyles(). To reproduce follow these steps...
>
> - Create a new winforms app
> - Add call to Application.EnableVisualStyles() before Application.Run()
> - Add a ListView control and a button to the form
> - In the button click handler, add 3 items to the listview items
collection
>
> Now go to "Debug...Exceptions" and set the debugger to break on any CLR
> exception. Run in the debugger.
>
> When you click the button, you'll see 6 "ArgumentOutOfRange" exceptions
> thrown (2 per item)! They are caught inside the method, but this is still
a
> bug... it should not throw... because:
>
> (a) this causes my application to run very slowly in debug mode (lots of
> items)
> (b) no exceptions are thrown if EnableVisualStyles() is not called
>
> Does anyone know a workaround?
>
- Next message: Marauderz: "Q : Programmatically Turn Off Screen Display"
- Previous message: Tom Dacon: "Re: Why doesn't setting CurrentUICulture use new culture"
- In reply to: Greg Ennis: "BUG in ListView - throws exceptions when adding items"
- Messages sorted by: [ date ] [ thread ]