By the way, I could use a hand figuring this Listview sort problem out.

From: Rod (fengist_at_earthlink.net)
Date: 02/18/05


Date: Fri, 18 Feb 2005 01:28:07 GMT

Have a listview. Some Subitem[2] entries need an icon, some don't.
It's just an icon, no text required. Text however is used to determine
whether to put an icon there when the subitem is added. '4'=Yes '1'=No.

Using the following, I'll be sorting the text based columns. Notice, I
have reverse sort temporarily disabled till I put in my boolean decision
maker.

procedure TForm1.MyviewCompare(Sender: TObject; Item1,
   Item2: TListItem; Data: Integer; var Compare: Integer);
var
   n1, n2: string;
begin
   n1 := Item1.SubItems[2];
   n2 := Item2.SubItems[2];
// if n1 > n2 then
// Compare := -1
// else if n1 < n2 then
// Compare := 1
// else
// Compare := 0;
     if n1 < n2 then
       Compare:=-1
     else if n1 > n2 then
       Compare :=1
     else
       compare:=0;
end;

My question is, how can I sort that column with just icons when there's
no text.
By the way, I've already tried the silly thing of throwing in the 1's
and 4's and using customdrawsubitem to change the font color to the
background color. Works fine till you click on it and a big stinking
number shines trhough the blue highlight bar.



Relevant Pages

  • Re: Appearance settings font selection
    ... I didn't count and compare. ... I had Arial through ZZZ Top listed for Icon Menu, Message box, Tooltip. ... System and Tahoma in the drop-down menu for the ...
    (microsoft.public.windowsxp.help_and_support)
  • RE: Solution Explorer
    ... I compare the code to another form and its the same. ... private System.ComponentModel.Container components = null; ... > Hi Cadel, ... > This icon is used when the file is a Component Class or a Windows Service. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Icon Help...One more time...
    ... method to see what happend. ... Unfortunately, when I compare ... that's when I'm having the icon resource problem. ...
    (comp.lang.smalltalk.dolphin)
  • Re: clicking on hd "c" brings up webpage not "c" partition
    ... "Michael A. Endsley" wrote: ... > icon, it brings up a webpage! ... > both icons to compare and they are virtually the same other than one ...
    (alt.os.linux.suse)
  • Re: MacFAQ OS Icons
    ... > It occurs with those entries that use the %X% and %C% shortcuts. ... The icon for OS X apps is not showing. ... I need some Apache/Perl/TWiki expert to help work out what's going on. ...
    (uk.comp.sys.mac)