هذا كود سورس أريد طباعة في MEMO كالتالي في سطر واحد P1P1P1P2P2
![[صورة: 14615050192241.png]](http://store1.up-00.com/2016-04/14615050192241.png)
![[صورة: 14615050192241.png]](http://store1.up-00.com/2016-04/14615050192241.png)
كود :
procedure TForm1.Button14Click(Sender: TObject);
//edit4.Text:=CXmemo2.Lines[1][8];
var i,j,k,l:integer; m:string;
begin
i:=1;
j:=1;
k:=1;
//StringGrid1.ColCount:=strtoint(edit1.Text);
//StringGrid1.RowCount:=strtoint(edit2.Text);
with StringGrid1 do
WHILE I <=strtoint(edit1.Text) do
BEGIN
WHILE J <= strtoint(edit2.Text) do
begin
if strtoint(Cells[i,j])>0 then
begin
l:=StrToInt(Cells[i,j]) ;
m:= (Cells[i-1,j]);
cxmemo4.Lines.ADD(Cells[i-1,j]);
//cxMemo4.Lines.Strings[k]:=(DupeString(m, l));
//k:=K+l;
ListBox1.Items.Add(Cells[i-1,j])
end;
J:=j+1;
end;
i:=i+1;
end;
end;
