[.NET] ListView not rendering properly

Started by
2 comments, last by Daggerbot 15 years, 11 months ago
Hi. I'm making my first (non-experimental) C#.NET project, and all was well for the first couple of days. But I've run into a problem. My ListView isn't rendering properly. Here is what it looks like: The gray strip at the top is supposed to be a set of headers, which should say "Character | Level | Health". Also, under the "Player" group, there should be an entry that says "Daggerbot | L0 | HP 0 / 0". I've done some debugging, and I'm pretty sure I've got the parameters correct. Has anybody seen this before? What am I doing wrong? All help is appreciated. EDIT: SOLVED [Edited by - Daggerbot on May 14, 2008 4:16:52 PM]
Advertisement
Can you post the code that constructs the list view?

Hi,

See what results you get from running this example from the MSDN: http://msdn.microsoft.com/en-gb/library/system.windows.forms.listview.aspx. If that works then I'd suggest trying to copy over your values into the Microsoft code. Otherwise post your code and I'll take a look at it.

Cheers,

James
Problem solved. The problem wasn't in the control initialization code. After a bit of debugging and commenting and uncommenting, I saw that to refresh the ListView, I was using listView.Clear() instead of listView.Items.Clear(). Thanks for your time.

This topic is closed to new replies.

Advertisement