Frequently Asked Component Specific Questions
Options |
|
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>

TAdvRichEditorCustomizing the popup menu
From the OnContextPopup event that is triggered before the popup menu is displayed, it is easy to customize it, for example to dynamically translate or add items.
This example performs a dynamic translation:
procedure TForm4.AdvRichEditor1ContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
begin
if AppLanguage = alGerman then
begin
AdvRichEditor1.PopupMenu.Items[0].Caption := ''Löschen'';
AdvRichEditor1.PopupMenu.Items[2].Caption := ''Ausschneiden'';
AdvRichEditor1.PopupMenu.Items[3].Caption := ''Kopieren'';
AdvRichEditor1.PopupMenu.Items[4].Caption := ''Einfügen'';
AdvRichEditor1.PopupMenu.Items[6].Caption := ''Ausrichten'';
AdvRichEditor1.PopupMenu.Items[6].Items[0].Caption := ''Links'';
AdvRichEditor1.PopupMenu.Items[6].Items[1].Caption := ''Zentrum'';
AdvRichEditor1.PopupMenu.Items[6].Items[2].Caption := ''Rechts'';
end;
end;