Page 1 of 1

Posted: Mon Nov 09, 2015 5:36 pm
by Sergey Tkachenko
Before selecting in a cell, activates editing of this cell:

Code: Select all

procedure TForm3.ChangeTableHeaderFontColor(RVData: TCustomRVData; RVE: TCustomRichViewEdit);
var
   I: Integer;
   Table: TRVTableItemInfo;
   Row, Column: Integer;
begin
   for I := 0 to RVData.ItemCount - 1 do
      if RVData.GetItemStyle(I) = rvsTable then
       begin
          [color=red]RVData := RVData.Edit;[/color]
          Table := TRVTableItemInfo(RVData.GetItem(I));
          Table.SelectRows(0, 1);
          rvActionFontColor1.UserInterface := rvacNone;
          rvActionFontColor1.Color := clWhite;
          rvActionFontColor1.ExecuteTarget(RVE);
          rvActionFontColor1.UserInterface := rvacAdvanced;
          for Row := 0 to Table.RowCount - 1 do
             for Column := 0 to Table.ColCount - 1 do
                if Assigned(Table.Cells[Row, Column]) then
                   ChangeTableHeaderFontColor(
                     Table.Cells[Row, Column].GetRVData, RVE);
       end;
end;