Click here to Skip to main content
15,891,431 members
Home / Discussions / C#
   

C#

 
Generaldocked controls snapping to grid in compiled app Pin
Nathan Ridley13-Feb-04 4:16
Nathan Ridley13-Feb-04 4:16 
GeneralRe: docked controls snapping to grid in compiled app Pin
leppie13-Feb-04 19:14
leppie13-Feb-04 19:14 
GeneralRe: docked controls snapping to grid in compiled app Pin
Nathan Ridley14-Feb-04 0:06
Nathan Ridley14-Feb-04 0:06 
AnswerRe: listView - is there a bug? Pin
thomasa13-Feb-04 1:54
thomasa13-Feb-04 1:54 
GeneralRe: listView - is there a bug? Pin
Andy H13-Feb-04 3:16
Andy H13-Feb-04 3:16 
GeneralRe: listView - is there a bug? Pin
Heath Stewart13-Feb-04 3:50
protectorHeath Stewart13-Feb-04 3:50 
GeneralRe: listView - is there a bug? Pin
Andy H13-Feb-04 9:55
Andy H13-Feb-04 9:55 
GeneralRe: listView - is there a bug? Pin
Heath Stewart13-Feb-04 12:07
protectorHeath Stewart13-Feb-04 12:07 
One important module of our application that I wrote uses this concept - only in a much better way. Instead of storing the paths in a separate ArrayList, just use the ListViewItem.Tag property. It's there for any use you need. Second, design your icon/filetype lookup so that it caches the information. Why use SHGetFileInfo (well, that's what I use anyway) for files you have already discovered? In fact, the Windows shell does this very thing with a system image list that caches all the icon for file types. If you want, I could send you my implementation. It works on the same principals as what Windows Explorer does and is incredibly fast.

Also, quit messing with the ArrayList.Capacity. This is only used to determine when the capacity should be increased. The default behavior is to double the capacity (best deterministic algorithm) when the count is the same as ahte capacity.

The reason you're probably seeing this "sparsly" placed icons is because you have LabelWrap set to false. The ListView class (and the List View common control it encapsulates) uses fixed-width columns to display items. If an item's text go beyond that, the item's text is spanned however many columns is required to show the full text. This virtual column is not pushed to make room. You'll see this behavior in Windows Explorer as well, for like I mentioned, the ListView class encapsulates the List View common control that Windows Explorer uses.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: listView - is there a bug? Pin
Andy H13-Feb-04 23:37
Andy H13-Feb-04 23:37 
QuestionlistView - is there a bug? Pin
Andy H12-Feb-04 23:48
Andy H12-Feb-04 23:48 
GeneralConvert String[] to System.Array Pin
RickardB12-Feb-04 20:11
RickardB12-Feb-04 20:11 
GeneralRe: Convert String[] to System.Array Pin
Mazdak12-Feb-04 20:38
Mazdak12-Feb-04 20:38 
GeneralRe: Convert String[] to System.Array Pin
Ungi.1-Mar-04 20:54
Ungi.1-Mar-04 20:54 
GeneralOpen DAO Recordset Pin
Daminda12-Feb-04 19:58
Daminda12-Feb-04 19:58 
GeneralRe: Open DAO Recordset Pin
Heath Stewart13-Feb-04 3:45
protectorHeath Stewart13-Feb-04 3:45 
GeneralHelp me finish this solution Pin
Anonymous12-Feb-04 19:30
Anonymous12-Feb-04 19:30 
GeneralRe: Help me finish this solution Pin
Heath Stewart13-Feb-04 3:42
protectorHeath Stewart13-Feb-04 3:42 
GeneralUsing Interfaces Practically Pin
Anonymous12-Feb-04 19:20
Anonymous12-Feb-04 19:20 
GeneralRe: Using Interfaces Practically Pin
Mazdak12-Feb-04 19:27
Mazdak12-Feb-04 19:27 
GeneralRe: Using Interfaces Practically Pin
Anonymous13-Feb-04 15:56
Anonymous13-Feb-04 15:56 
GeneralRe: Using Interfaces Practically Pin
Nick Seng12-Feb-04 21:44
Nick Seng12-Feb-04 21:44 
GeneralRe: Using Interfaces Practically Pin
Brian Delahunty13-Feb-04 0:48
Brian Delahunty13-Feb-04 0:48 
GeneralRe: Using Interfaces Practically Pin
Jonathan de Halleux13-Feb-04 2:39
Jonathan de Halleux13-Feb-04 2:39 
GeneralRe: Using Interfaces Practically Pin
paw197213-Feb-04 5:33
paw197213-Feb-04 5:33 
GeneralMaking Variables In C# Global Pin
Eric Houser12-Feb-04 18:44
Eric Houser12-Feb-04 18:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.