PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: James Fuller on February 15, 2010, 09:49:11 AM

Title: ListView problem
Post by: James Fuller on February 15, 2010, 09:49:11 AM
This was going to be an example of large headers in a listview but I can't seem to add any data to any but the first (0) column??

James
Title: Re: ListView problem
Post by: Paul Squires on February 15, 2010, 11:25:25 AM
Hi James,

Rows are zero based in Listviews but it looks like your "k" variable is starting at one. Try modifying the code to the following:


      'This works   
      FF_ListView_InsertItem hLv1,k-1,0,Rec(0)
      'This does Not work
      RetVal = FF_ListView_InsertItem( hLv1,k-1,1,Rec(1))
      If k = 1 Then
         ? "RetVal = " + Format$(RetVal)         
      End If

Title: Re: ListView problem
Post by: James Fuller on February 15, 2010, 11:39:09 AM
Thanks Paul that was the problem.
I'll clean up the code and post it later.

James
Title: Re: ListView problem
Post by: Paul Squires on February 15, 2010, 11:39:58 AM
I forgot to also mention that I have always had trouble with Listviews and customdraw when Themes are enabled. For some reason the drawing does not occur. I remember posting about this last year and I never did get a resolution to it. Probably means having to draw the text, etc, using new XP theme functions....
Title: Re: ListView problem
Post by: James Fuller on February 15, 2010, 11:48:23 AM
The custom draw code is not mine. I'm not sure where I got it. In the original program I was using Peter Redi (?) listview include file so the custom draw code may also be his.

James

Edit: The original code was  By Jules Marchildon April/2002 and Inspired by Mark Newman.
Title: Re: ListView problem
Post by: Roger Garstang on February 15, 2010, 05:15:19 PM
Custom Data and autosizing the first column with themes enabled Pre-Vista doesn't work right either.