RAD Studio |  |

Selecting All Text

The SelectAll method selects the entire contents of an edit control, such as a rich edit or memo component. This is especially useful when the component's contents exceed the visible area of the component. In most other cases, users select text with either keystrokes or mouse dragging.

To select the entire contents of a rich edit or memo control, call the RichEdit1 control's SelectAll method.

For example:

Copy Code

    procedure TMainForm.SelectAll(Sender: TObject);
    begin
      RichEdit1.SelectAll;  { select all text in RichEdit }
    end;

Copy Code

    void __fastcall TMainForm::SelectAll(TObject *Sender)
    {
      RichEdit1->SelectAll();     // select all text in RichEdit
    }

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!