don't clear cell if containing picture (bmp)
Posted: Tue May 16, 2006 1:22 pm
Hello,
first thanks to Sergey for his last answere (fix memo-table-cell-border-lines).
Now I want to clear (and center) memo-table.cells if they are empty or contain a 'x'.
Until I don't put a picture (vertical script as bmp) all okay (see below).
How can I prevent that in this case (cell contains a bmp-picture) cell is cleared?
Jürgen
for r := 0 to rveTable.Rows.Count-1 do begin
for c:=4 to 6 do begin
s:='';
if rveTable.Cells[r,c]<>nil then begin
rveTable.EditCell(r,c);
s:=ansiLowerCase(memo.TopLevelEditor.GetCurrentItemText);
if (s='') or (s='x') then begin
//s='' if cell contains a picture (bmp) <------------------
// in this case cell shall not be cleared <------------------
// How can I prevent that in this case cell is cleared?
rveTable.Cells[r,c].Clear; //löscht, aber zentriert nicht
rveTable.Cells[r,c].AddNL('',0,1); //damit zentriert
end; //if (s='') or
end; //if rveTable.Cells[r,c]
end; //for c:=4 to 6 do begin
end; //for r := 0 to rveTable.Rows.Count-1
first thanks to Sergey for his last answere (fix memo-table-cell-border-lines).
Now I want to clear (and center) memo-table.cells if they are empty or contain a 'x'.
Until I don't put a picture (vertical script as bmp) all okay (see below).
How can I prevent that in this case (cell contains a bmp-picture) cell is cleared?
Jürgen
for r := 0 to rveTable.Rows.Count-1 do begin
for c:=4 to 6 do begin
s:='';
if rveTable.Cells[r,c]<>nil then begin
rveTable.EditCell(r,c);
s:=ansiLowerCase(memo.TopLevelEditor.GetCurrentItemText);
if (s='') or (s='x') then begin
//s='' if cell contains a picture (bmp) <------------------
// in this case cell shall not be cleared <------------------
// How can I prevent that in this case cell is cleared?
rveTable.Cells[r,c].Clear; //löscht, aber zentriert nicht
rveTable.Cells[r,c].AddNL('',0,1); //damit zentriert
end; //if (s='') or
end; //if rveTable.Cells[r,c]
end; //for c:=4 to 6 do begin
end; //for r := 0 to rveTable.Rows.Count-1