// shortcuts for Bold, Underline and Italic
if ( ActiveControl = rve ) then
begin
// Bold
if ( (ssCtrl in Shift) and ( key = ord('B')) ) then
begin
// simulate button press
if btnBold.Down = False then
btnBold.Down := True
else
btnBold.Down := False ;
rve.ApplyStyleConversion(1); // bold tag
end ;
// italics
if ( (ssCtrl in Shift) and ( key = ord('K')) ) then
begin
// simulate button press
if btnItalic.Down = False then
btnItalic.Down := True
else
btnItalic.Down := False ;
rve.ApplyStyleConversion(2); // italics tag
end ;
// underline
if ( (ssCtrl in Shift) and ( key = ord('U')) ) then
begin
// simulate button press
if btnUnderline.Down = False then
btnUnderline.Down := True
else
btnUnderline.Down := False ;
rve.ApplyStyleConversion(3); // italics tag
end ;
Code: Select all