ListView problem

Started by James Fuller, February 15, 2010, 09:49:11 AM

Previous topic - Next topic

James Fuller

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

Paul Squires

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

Paul Squires
PlanetSquires Software

James Fuller

#2
Thanks Paul that was the problem.
I'll clean up the code and post it later.

James

Paul Squires

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....
Paul Squires
PlanetSquires Software

James Fuller

#4
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.

Roger Garstang

Custom Data and autosizing the first column with themes enabled Pre-Vista doesn't work right either.