WPCubed Product Support

TableAddCellEvent does not work correct

in my own Component (from TWPRichText) i use

procedure TMyWPRichText.TableAddCellEvent(RowNr, ColNr: Integer;
  par: TParagraph);
begin
  // 1  based !
  if ColNr = 1 then begin
    par.SetText(RowNr.ToString);
  end;
end;

but the text comes in all Cells!

What can i do?

Ciao
Stefan

#1 ♥ 0
3.4k Views 2 users read 1 min
support

The text should go into the first column and in my test it does.

procedure TWPMiniEd.TableAddCellEvent(RowNr, ColNr: Integer;
  par: TParagraph);
begin
  // 1  based !
  if ColNr = 1 then begin
    par.SetText(RowNr.ToString);
  end;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
    WPRichText1.TableAdd(3,5,[], nil, TableAddCellEvent );
    WPRichText1.ReformatAll(true,true);
end;
#2 ♥ 0
This category is archived. No new posts are possible.