TControlPerform (Delphi)
Description
The following example demonstrates the use of the Perform method to send a windows message. The EM_SCROLLCARET message scrolls the caret in the rich edit into view. The caret position is set to the contents of the mask edit prior to calling Perform.
Code
procedure TForm1.Button1Click(Sender: TObject);
begin
with RichEdit1 do
Begin
SelStart := StrToInt(MaskEdit1.Text);
Edit1.Text := InttoStr(SelStart);
RichEdit1.Perform(EM_SCROLLCARET, 0, 0);
RichEdit1.SetFocus;
end;
end;
Uses
- Vcl.Controls.TControl.Perform ( fr | de | ja )
- Vcl.Controls.TWinControl.SetFocus ( fr | de | ja )