CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: [RESOLVED] ListView Group Display Problem at run-time

  1. #1
    Join Date
    Mar 2007

    [RESOLVED] ListView Group Display Problem at run-time


    I've come across a really weird problem. I was trying to see the groups in my application, but it didn't seems to work at run-time. So, I stated to develop my control in a test application. Everything works fine. So, I've tried again since I was a lot better with the control and it still doesn't work.

    So, when I'm in the designer, I add group, add items and we can see them fine. But as soon as I run the application, I loose all the grouping. I've put a screenshot in attachment.

    So, I was wondering what can cause that? I've tried to search information on the net, but didn't found anything? Any idea would be welcome. It's probably a setting in my project, a reference or something like that, but I've looked at everything and didn't find any anomaly.

    Thanks in advance!
    Attached Images Attached Images  

  2. #2
    Join Date
    Mar 2007

    Re: ListView Group Display Problem at run-time

    Hahaha, looks like posting made me thought about the problem. I'm under XNA and I'm making an editor. I just remember I had to put the attribute STAThread. So, after comparing the 2 program.cs, I found out that there was a missing line that 6-7 month ago didn't made sense to me, but now reading it, make all the sense in the world:

    So, seems like the styles are related to the groups in the ListView.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)