Inno Setup entry (20) -- Inno Setup class reference (6)

Source: Internet
Author: User

Storage box

The storage box is also a typical window visualization component. Similar to the editing box, you can enter and display text. However, unlike the editing box, the editing box can only edit and display a single line of text, the storage box can operate on multiple lines of text. The storage box class is defined as follows:<Xmlnamespace prefix = "O" NS = "urn: Schemas-Microsoft-com: Office: office"/>

Tmemo = Class (tcustommemo)

Property lines: tstrings; read write;

Property alignment: talignment; read write;

Property borderstyle: tborderstyle; read write;

Property color: tcolor; read write;

Property Font: tfont; read write;

Property hideselection: Boolean; read write;

Property maxlength: integer; read write;

Property readonly: Boolean; read write;

Property scrollbars: tscrollstyle; read write;

Property wantreturns: Boolean; read write;

Property wanttabs: Boolean; read write;

Property wordwrap: Boolean; read write;

Property onchange: tpolicyevent; read write;

Property onclick: tpolicyevent; read write;

Property ondblclick: tpolicyevent; read write;

Property onkeydown: tkeyevent; read write;

Property onkeypress: tkeypressevent; read write;

Property onkeyup: tkeyevent; read write;

End;

The hierarchical structure model is as follows:

The bucket is inherited fromTcustomeditClass, but inTmemoThere is anotherTcustommemoClass, which adds an attribute:LinesThat is, multi-line text operations.

The followingCodeThe creation and properties of the edit box are displayed.

 

[Setup]

Appname = test

Appvername = test

Defaultdirname = "E: \ test"

Appversion = 1.0

[Files]

Source: "F: \ Desktop \ Inno \ ipmsg.exe"; flags: dontcopy

[Code]

VaR

Mypage: twizardpage;

Radio1, redio2: tradiobutton;

MM: tmemo;

Procedure initializewizard ();

Begin

Mypage: = createcustompage (wpwelcome ,'Title: Custom page','Description: This is my custom page.');

MM: = tmemo. Create (mypage );

Mm. Parent: = mypage. surface;

Mm. Text: ='Storage box test';

Mm. lines. Add ('This is a new row.');

Mm. lines. insert (0 ,'I am at the beginning');

Mm. lines. Add ('Delete me, row 4');

Mm. lines. Delete (3 );

{Row number from0Exclusive, insert to the front}

Mm. wordwrap: = true ;{Automatic line feed}

Mm. wanttabs: = true ;{AcceptTabKey}

Mm. wantreturns: = true ;{Line feed}

Mm. scrollbars: = ssvertical ;{Scroll bar}

End;

 

The running effect is as follows:

The following describes the attributes of the bucket.

Because many attributes of the bucket and the editing box are the same, I will not go into details here. I will mainly talk about several special attributes of the editing box.Scrollbar Specifies the scroll bar status of the storage box. Optional values include Ssboth , Sshorizonal , Ssnone , Ssvertical And its meaning is described as a value. Wantreturns Attribute depends on Enter Click the OK button after the key (the corresponding property value is False ) Or the storage box line feed (the corresponding property value isTrue ). If this value is set False To change the line in the editing box, you must press CTRL + enter Key, which corresponds Qq The message sending box of is the same. Wanttabs Attribute depends on Press Tab The key is the focus of the component in the switching window (the corresponding property value is False ) Or move the cursor in the storage box (the corresponding property value is True ). If this value is setFalse To move the cursor in the editing box, you must press CTRL + Tab Key. The last attribute is Wordwarp This attribute determines whether to automatically wrap the text in the storage box. The attribute value is True Automatically wrap False The newline is not allowed. NOTE: If Scrollbars The property is Ssboth Or Sshorizonal , Will not automatically wrap, because the scroll bar will automatically adjust the width.

In additionLinesAttribute. This attribute is actually a class and belongsTstringThis attribute is mainly used to operate a line of text in the bucket. Available functions include:Add,Clear,Delete,Insert,Count.

 

 

From: http://www.360doc.com/content/13/0327/14/4221543_274240504.shtml

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.