Create shortcut

Posted in Components

This example creates a shortcut for color menu item with a Ctrl+O key combination.

procedure TForm1.Button1Click(Sender: TObject);
begin
  Color1.ShortCut:=ShortCut(Word('O'), [ssCtrl]);
end;