rvActionInsertTable: How to preset vertical Middle alignment

General TRichView support forum. Please post your questions here
Post Reply
PeterPanino
Posts: 57
Joined: Tue Jul 13, 2010 10:50 pm

rvActionInsertTable: How to preset vertical Middle alignment

Post by PeterPanino »

I use rvActionInsertTable to insert a table into RichViewEdit. Unfortunately, the cells in this table are all vertically aligned to the Top. So how can I preset this action to have all cells vertically aligned to Middle instead?

RichView 13.6.3
Delphi XE2
Windows 7 x64 SP1
PeterPanino
Posts: 57
Joined: Tue Jul 13, 2010 10:50 pm

Typo

Post by PeterPanino »

Sorry for the typo. Of course the action name is:

r v A c t i o n I n s e r t T a b l e
PeterPanino
Posts: 57
Joined: Tue Jul 13, 2010 10:50 pm

Found a solution:

Post by PeterPanino »

Code: Select all

procedure TformHV.rvActionInsertTable1Inserting(Sender: TrvActionInsertTable; table: TRVTableItemInfo);
var
  i: Integer;
begin
  for i := 0 to table.RowCount - 1 do  
    table.SetRowVAlign(rvcMiddle, i);
end;
Or is there a better way?
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Using OnInserting is the only way.
You can define properties of a table itself by changing properties of TrvActionInsertTable, but if you want to change properties of rows and/or cells, use this event.
Post Reply