tslediter/funcext/tvclib/tcustomsplitter.tsf

47 lines
1.2 KiB
Plaintext

type tcustomsplitter = class(tgraphiccontrol)
{**
@explan(˵Ã÷)µ÷Õû·Ö¸î¿Ø¼þ
**}
function create(AOwner);
begin
inherited;
Caption := "";
color := 0xf0f0f0;//0xEED2BC;
Width := 6;
Height := 100;
end
function paint();override;
begin
inherited;
r := ClientRect;
dc := Canvas;
if Border then
begin
dc.pen.color := 0;
dc.pen.Width := 2;
dc.draw("polygon",array(r[0:1],r[array(2,1)],r[array(2,3)],r[array(0,3)],r[0:1]));
end
clr := 0x123232;
x := integer(r[0]+(r[2]-r[0])/2);
y := integer(r[1]+(r[3]-r[1])/2);
sz := 4;
sp := 5;
for j :=(0 -sz) to sz do
begin
for i:=(0 -sz) to sz do
begin
x1 := x+sp*i;
y1 := y+sp*j;
if x1>r[0] and x1<r[2] and y1>r[1] and y1<r[3] then
begin
dc.SetPixel(array(x1,y1),clr);
end
end
end
end
function SetAlign(a);override;
begin
inherited;
end
end