TsrvActionCustomLayout.OnExecuted |
Top Previous Next |
|
Occurs after the action applies the layout property OnExecuted: TNotifyEvent; This event may be useful if you have buttons for document view modes in the scrollbar area of TSRichViewEdit control. You can use this event to synchronize buttons with the actions. Example: (assuming that the buttons are in the following order: draft, web layout, print layout) // SRichViewEdit1.OnHMenuClickButton procedure TfrmMain.SRichViewEdit1HMenuClickButton(Sender: TObject; ToolButton: TSRVToolButton); begin if ToolButton = nil then Exit; SRichViewEdit1.CanUpdate := False; case (ToolButton.Index) of 0 : srvActionLayoutDraft1.Execute; 1 : srvActionLayoutWeb1.Execute; 2 : srvActionLayoutPrint1.Execute; end; ActiveEditor.CanUpdate := True; end; // After doc view actions are executed procedure TfrmMain.srvActionLayoutDraft1Executed(Sender: TObject); begin TSRVToolButton(SRichViewEdit1.MenuHButtons.Items[0]).Down := True; end; procedure TfrmMain.srvActionLayoutWeb1Executed(Sender: TObject); begin TSRVToolButton(SRichViewEdit1.MenuHButtons.Items[1]).Down := True; end; procedure TfrmMain.srvActionLayoutPrint1Executed(Sender: TObject); begin TSRVToolButton(SRichViewEdit1.MenuHButtons.Items[2]).Down := True; end; |