unit ChannelList_Window;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, ComCtrls, Menus;
type
TCList = class(TForm)
ChanList: TListBox;
Hash: TImage;
Status: TStatusBar;
Kludge: TEdit;
procedure ChanListDrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
CList: TCList;
implementation
{$R *.DFM}
procedure TCList.ChanListDrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
Var Offset: Integer;
Txt,T1,T2,T3:String;
begin
with (Control as TListBox).Canvas do
begin
FillRect(Rect);
Offset:=hash.width+6;
Font.Style:=[fsBold,fsUnderline];
If Index<>0 then
begin
BrushCopy(Bounds(Rect.Left+2,Rect.Top,hash.Width,hash.Height),hash.picture.bitmap,
Bounds(0,0,hash.Width,hash.Height),clWhite);
Font.Style:=[];
end;
Txt:=ChanList.Items[Index];
T1:=Copy(Txt,1,Pos(#9,Txt)-1);
Delete(Txt,1,Pos(#9,Txt));
T2:=Copy(Txt,1,Pos(#9,Txt)-1);
Delete(Txt,1,Pos(#9,Txt));
T3:=Txt;
TextOut(Rect.Left+Offset,Rect.Top,T1);
TextOut(Rect.Left+Offset+80,Rect.Top,T2);
TextOut(Rect.Left+Offset+130,Rect.Top,T3);
end;
end;
end.