菜单的DrawItem事件如下:procedure TForm6.N2DrawItem(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; Selected: Boolean);
var
x:integer;
flag:boolean;
label k,l;
begin
if (form1.adotable1.Eof) and(form1.ADOTable1.RecordCount>0) then
begin
timer1.Enabled:=false;
ACanvas.Font.Color:=clRed;
ACanvas.Font.Style:=[fsBold];
ACanvas.TextOut(ARect.Left+5,ARect.Top+5,'中国');
timer1.Enabled:=true;timer1.Enabled:=false;
ACanvas.Font.Color:=clblack;
ACanvas.Font.Style:=[fsBold];
ACanvas.TextOut(ARect.Left+5,ARect.Top+5,'中国');
timer1.Enabled:=true;
end;
end;
我想在timer中调用这个事件,以达到字体颜色闪动的效果。不知道调用的格式是什么,求助
就是form6.n2drawitem();这个()里应该写些什么东西。
ARect: TRect; Selected: Boolean);
var
x:integer;
flag:boolean;
label k,l;
begin
if (form1.adotable1.Eof) and(form1.ADOTable1.RecordCount>0) then
begin
timer1.Enabled:=false;
ACanvas.Font.Color:=clRed;
ACanvas.Font.Style:=[fsBold];
ACanvas.TextOut(ARect.Left+5,ARect.Top+5,'中国');
timer1.Enabled:=true;timer1.Enabled:=false;
ACanvas.Font.Color:=clblack;
ACanvas.Font.Style:=[fsBold];
ACanvas.TextOut(ARect.Left+5,ARect.Top+5,'中国');
timer1.Enabled:=true;
end;
end;
我想在timer中调用这个事件,以达到字体颜色闪动的效果。不知道调用的格式是什么,求助
就是form6.n2drawitem();这个()里应该写些什么东西。
这里()里应该写些什么东西呢