Switch selected information in tdbrichviewdit to bold/normal
Posted: Fri May 25, 2012 11:00 am
I have next code for that. I click on a type TSpeedButton to launch the procedure and all is well
const
{ Parameters for ApplyStyleConversion }
TEXT_BOLD = 1;
TEXT_ITALIC = 2;
TEXT_UNDERLINE = 3;
{ bold, italic, underline }
procedure TSDIAppForm.btnEstiloFuenteClick(Sender: TObject);
var
button: TSpeedButton;
begin
button := Sender as TSpeedButton;
{ constants TEXT_BOLD, TEXT_ITALIC and TEXT_UNDERLINE are
assigned to the tags of corresponding buttons }
EditorNotas.ApplyStyleConversion(Button.Tag);
end;
I need to do the same with the right mouse button from the tdbrichviewedit popup menu. What would be the necessary code
Thank in advance.
const
{ Parameters for ApplyStyleConversion }
TEXT_BOLD = 1;
TEXT_ITALIC = 2;
TEXT_UNDERLINE = 3;
{ bold, italic, underline }
procedure TSDIAppForm.btnEstiloFuenteClick(Sender: TObject);
var
button: TSpeedButton;
begin
button := Sender as TSpeedButton;
{ constants TEXT_BOLD, TEXT_ITALIC and TEXT_UNDERLINE are
assigned to the tags of corresponding buttons }
EditorNotas.ApplyStyleConversion(Button.Tag);
end;
I need to do the same with the right mouse button from the tdbrichviewedit popup menu. What would be the necessary code
Thank in advance.