📄 u_form_blue.~pas
字号:
grid1_4.Cells[i,grid1_4.RowCount-1].Color:=rgb(255,255,0);
end;////
grid1_4.Cells[1,grid1_4.RowCount-1].ForeText:='0';
grid1_4.Cells[2,grid1_4.RowCount-1].ForeText:='1';
grid1_4.Cells[3,grid1_4.RowCount-1].ForeText:='2';
grid1_4.Cells[4,grid1_4.RowCount-1].ForeText:='3';
grid1_4.Refresh;
////在表格中显示数据////////////////
for i:=1 to 28 do
begin
for j:=1 to 16 do
begin
if CP_Data[i,1]=j then
begin
if (CP_Data[i,1] mod 4)=0 then
begin
grid1_4.Cells[1,i+1].ForeText:=inttostr(j);
end;
if (CP_Data[i,1] mod 4)=1 then
begin
grid1_4.Cells[2,i+1].ForeText:=inttostr(j);
end;
if (CP_Data[i,1] mod 4)=2 then
begin
grid1_4.Cells[3,i+1].ForeText:=inttostr(j);
end;
if (CP_Data[i,1] mod 4)=3 then
begin
grid1_4.Cells[4,i+1].ForeText:=inttostr(j);
end;
end;//if
end;
end;///for i
///////为第四个表格设置结束//////////////////////////////////////////////
////////////////////////////////////////////
end;
procedure TForm_Blue.Image2Click(Sender: TObject);
begin
CloseForm(handle);
end;
procedure TForm_Blue.TabCtrlDrawTab(Control: TCustomTabControl;
TabIndex: Integer; const Rect: TRect; Active: Boolean);
var
TabTitle:Array[0..10] of string;
begin
TabTitle[0]:='蓝球分布图';
TabTitle[1]:='蓝球曲线图';
TabTitle[2]:='螺旋走势图';
TabTitle[3]:='奇偶走势分布';
TabTitle[4]:='vxxvxcv';
//TabTitle[4]:='工龄段查询';
with Control.Canvas do
begin
if active then
begin
Font.Color:=clRed;
Font.Name:='宋体';
Font.Size:=10;
end
else
begin
Font.Style:=[];
Font.Name:='宋体';
Font.Size:=10;
end;
TextRect(Rect,Rect.Left+20,Rect.Top+3,TabTitle[TabIndex]);////输出标题
ImageList1.Draw(Control.Canvas,Rect.Left+2,Rect.Top+2,TabIndex);///画图标
end;///with
end;
procedure TForm_Blue.Grid1_1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TEasyGridDrawState);
var
i,j,m:integer;
//k:integer;
r:integer;
k:integer;///用来计算存储的坐标的记数器//////////
K_Value:integer;///用来存储坐标///////////////////
M_Value:integer;
begin
with grid1_1 do
begin
canvas.Pen.Color:=rgb(0,0,0);
canvas.Pen.Width:=2;
canvas.MoveTo(192,0);
canvas.LineTo(192,544);
end;///with1
////画篮球号码///////////
grid1_1.Canvas.brush.Color:=rgb(255,0,0);
grid1_1.Canvas.Pen.Color:=rgb(255,0,0);
grid1_1.Canvas.Pen.Width:=1;
grid1_1.canvas.Font.Color:=rgb(255,255,255);
//grid1_1.Canvas.Font.Size:=9;
/////在显示数据的列上画圆画篮球/////////////
for m:=2 to grid1_1.RowCount-2 do /////多个记录//////////
begin
for j:=1 to 1 do ///是记录的1个极端值
begin
for i:=1 to 16 do/////对16个数值进行扫描////////
begin
if CP_Data[m-1,j]=i then
begin
grid1_1.Canvas.Ellipse(grid1_1.CellRect(i+1,m) );
//grid1.Canvas.TextRect()
end;
end; ///for i
end;///j
end;//for m
//////在数据列上显示数字///////////////////////
/////在显示数据列上画红球数字///////////////////
//grid1_1.Canvas.brush.Color:=rgb(255,0,0);
grid1_1.Canvas.Brush.Style:=bsclear;
grid1_1.Canvas.Pen.Color:=rgb(255,0,0);
grid1_1.canvas.Font.Color:=rgb(255,255,255);
grid1_1.Canvas.Font.Size:=9;
////////////////////////////////////////////////////
//grid1.Cells[2,2].FontColor:=rgb(255,255,255);
k_value:=0;
with Grid1_1.Canvas do
begin
for m:=2 to 29 do
begin
//////
M_Value:=0;
for r:=1 to m-1 do
begin
M_Value:=M_Value+grid1_1.RowHeights[r];
end;
////////
if m=2 then
begin
M_Value:=M_Value+3;
end;
if m=3 then
begin
M_Value:=M_Value+4;
end;
if m=4 then
begin
M_Value:=M_Value+6;
end;
if m=5 then
begin
M_Value:=M_Value+7;
end;
if m=6 then
begin
M_Value:=M_Value+8;
end;
if m=7 then
begin
M_Value:=M_Value+9;
end;
if m=8 then
begin
M_Value:=M_Value+10;
end;
if m=9 then
begin
M_Value:=M_Value+11;
end;
if m=10 then
begin
M_Value:=M_Value+12;
end;
if m=11 then
begin
M_Value:=M_Value+13;
end;
if m=12 then
begin
M_Value:=M_Value+14;
end;
if m=13 then
begin
M_Value:=M_Value+15;
end;
if m=14 then
begin
M_Value:=M_Value+16;
end;
if m=15 then
begin
M_Value:=M_Value+17;
end;
if m=16 then
begin
M_Value:=M_Value+18;
end;
if m=17 then
begin
M_Value:=M_Value+19;
end;
if m=18 then
begin
M_Value:=M_Value+20;
end;
if m=19 then
begin
M_Value:=M_Value+21;
end;
if m=20 then
begin
M_Value:=M_Value+22;
end;
if m=21 then
begin
M_Value:=M_Value+23;
end;
if m=22 then
begin
M_Value:=M_Value+24;
end;
if m=23 then
begin
M_Value:=M_Value+25;
end;
if m=24 then
begin
M_Value:=M_Value+26;
end;
if m=25 then
begin
M_Value:=M_Value+27;
end;
if m=26 then
begin
M_Value:=M_Value+28;
end;
if m=27 then
begin
M_Value:=M_Value+29;
end;
if m=28 then
begin
M_Value:=M_Value+30;
end;
if m=29 then
begin
M_Value:=M_Value+31;
end;
///////////////
for j:=1 to 1 do
begin
for i:=1 to 33 do
begin
if CP_data[m-1,j]=i then
begin
///showmessage('dsfdsfdsf');
k_value:=0;
for k:=1 to i+1 do
begin
k_value:=k_Value+grid1_1.ColWidths[k];
end;///k
//showmessage(inttostr(k_Value));
/////////////////////////////
if i=1 then
begin
TextOut(k_value-9,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=2 then
begin
TextOut(k_value-8,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=3 then
begin
TextOut(k_value-7,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=4 then
begin
TextOut(k_value-6,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=5 then
begin
TextOut(k_value-6,m_Value,inttostr(CP_Data[m-1,j]));
end;
if i=6 then
begin
TextOut(k_value-4,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=7 then
begin
TextOut(k_value-4,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=8 then
begin
TextOut(k_value-3,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=9 then
begin
TextOut(k_value-2,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=10 then
begin
TextOut(k_value-4,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=11 then
begin
TextOut(k_value-3,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=12 then
begin
TextOut(k_value-2,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=13 then
begin
TextOut(k_value-1,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=14 then
begin
TextOut(k_value,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=15 then
begin
TextOut(k_value+1,M_Value,inttostr(CP_Data[m-1,j]));
end;
if i=16 then
begin
TextOut(k_value+2,M_Value,inttostr(CP_Data[m-1,j]));
end;
//////////////////////////////////
end;//if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -