Introduction to Delphi xe2 firemonkey (40)-control basics: tmemo

Source: Internet
Author: User
Notes:

1. Many features of its parent class tscrollbox are also very useful, such:

 
Memo1.usesmallscrollbars: = true;

2. A stack list management action is used internally. Now you can perform multiple Undo operations ).

3. A new struct tcaretposition is used to describe the current position, and a common constructor composecaretpos () is provided for this structure ().

 
Tcaretposition = record line, POS: integer; end;

4. The case-sensitive charcase attribute of enumeration is provided.

 
Memo1.charcase: = teditcharcase. ecuppercase;

5. Provide the boolean property Autoselect to determine whether to automatically select all Focus values.

6. The current lines attribute reads the text set after automatic line breaks. The original set is read using unwraplines.

 
Memo1.charcase: = teditcharcase. ecuppercase;

7. New methods such as insertafter () and deletefrom () are provided.

{Tmemo} public constructor create (...); override; // destructor destroy; override; // procedure copytoclipboard; // copy procedure clipboard; // paste procedure cuttoclipboard; // cut procedure clearselection; // deselect procedure selectall; // select all procedure gototextend; // to the end of procedure gototextbegin; // to start procedure gotolineend; // to the end of the line, procedure gotolinebegin; // to the beginning of the line, getpositionpoint (...): tpoin TF; // obtain the current position procedure undo; // undo procedure insertafter (...); // insert procedure deletefrom (...); // Delete the content in the specified range Function textpostopos (...): tcaretposition; // calculate the cursor position function postotextpos (...) based on the specified text length (...): integer; // textpostopos () Inverse Calculation property selstart: integer ...; // The starting position of the selected area text property sellength: integer ...; // The length of the selected area text property seltext: String ...; // selected text property caretposition: tcaretposition ...; // Input Position of the cursor property linewidth [linenum: integer]: single ...; // obtain the width of the specified row property unwraplines: tstrings ...; // a set of original text without line breaks; When wordwrap is set to false, it is the same as line property fontfill: tbrush ...; // text brush property selectionfill: tbrush ...; // selection brush published property cursor default cribeam; // the mouse cursor property canfocus default true; // whether the focus property disablefocuseffect can be owned; // whether to disable the focus effect property taborder; // tab order property autosel ECT: Boolean ...; // whether to automatically select all property charcase: teditcharcase ...; // The case-sensitive option property enabled; // whether the property hideselection: Boolean ...; //? Property lines: tstrings ...; // The set of text after automatic line feed property maxlength: integer ...; // maximum length property readonly: Boolean ...; // read-only property onchange: tpolicyevent ...; // property onchangetracking: tpolicyevent ...; // property wordwrap: Boolean ...; // whether to automatically wrap the property Font: tfont ...; // font property text: String ...; // content property textalign: ttextalign ...; // property stylelookup; // specify the style end;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.