(figure 1) above, to achieve the effect, on line is not even in a number of grid,
the current effect
Draw a straight line on the StringGrid, achieve the result of (figure 1), the line is shorter, a great god, please help,
CodePudding user response:
Draw lines of code to stick to Chou Chou?I first thought is finished first invalidaterect update to specify the content of the cell to clear across the line
CodePudding user response:
Grid line drawing, and then draw the scarlet letter, only canCodePudding user response:
//the begin==================span attachment code=================================
If (ACol>=span of attachment 1) and (ACol
The begin
If TempStr<> "' then
The begin
If Arow=2 then
The begin
Span wires x1:=round ((the Rect. Left + the Rect. Right)/2);
Attachment x2 span:=round ((the Rect. Top + the Rect. Bottom)/2)
End
The else
The begin
Span wires y1:=round ((the Rect. Left + the Rect. Right)/2);
Span wires y2:=round ((the Rect. Top + the Rect. Bottom)/2)
end;
end;
If (ACol attachment 1 +=span span of attachment 2-1) and (Arow> 2) then
The begin
Canvas. Pen. Width:=2;
Canvas. Pen. Color:=ztColor;
Canvas. MoveTo (span span attachment x1, x2) attachment;
Canvas. LineTo (span span the attachment y1, y2 attachment);
Span span wires x1:=y1 attachment;
Attachment x2 span: attachment y2=span;
end;
end;
//end====================span attachment code=================================
Attachment code, when performing to the current case, the corresponding grid connected on a line, so can't draw the line, even frame again
CodePudding user response:
Can be finished, then simply draw a gridCodePudding user response:
It will take a lot of judgment?CodePudding user response: