I want to extend the updation of TrvAction. For example there is TrvActionTableInsertRowsBelow. It’s enabled when the cursor is at the table and document is not read-only and so on. I need to save this behavior and add some extra conditions. For example I want to action is only enabled if the table has 3 columns and 2 rows.
In order to achieve this I add TrvActionTableInsertRowsBelow to the action list and implement OnUpdate event:
Code: Select all
procedure TForm1.aInsertRowsBellowUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := AreMyConditionsSatisfied;
end;