Flex-textarea-control
フレックス-TextAreaコントロール
前書き
TextAreaコントロールは、ユーザーが複数行の書式付きテキストを入力および編集できるようにするテキスト入力コントロールです。
クラス宣言
以下は spark.components.TextArea クラスの宣言です-
パブリックプロパティ
Sr.No | Properties & Description |
---|---|
1 |
content : Object このプロパティは、コンパイル時にMXMLで使用するためのものです。実行時にリッチテキストコンテンツを取得または設定するには、代わりにtextFlowプロパティを使用します。 |
2 |
heightInLines : Number 行単位で測定されたコントロールのデフォルトの高さ。 |
3 |
textFlow : flashx.textLayout.elements:TextFlow このコンポーネントによって表示されるリッチテキストを表すTextFlow。 |
4 |
widthInChars : Number em単位で測定されたコントロールのデフォルトの幅。 |
パブリックメソッド
Sr.No | Method & Description |
---|---|
1 |
TextArea() コンストラクタ。 |
2 |
getFormatOfRange (requestedFormats:Vector.<String> = null, anchorPosition:int = -1, activePosition:int = 1):flashx.textLayout.formats:TextLayoutFormat 指定された文字範囲の計算された形式を指定するTextLayoutFormatオブジェクトを返します。 |
3 |
scrollToRange(anchorPosition:int = 0, activePosition:int):void テキスト範囲がコンテナに表示されるようにスクロールします。 |
4 |
setFormatOfRange (format:flashx.textLayout.formats:TextLayout Format, anchorPosition:int = -1, activePosition:int = -1):void 指定された形式に対応する指定された範囲内の各要素に、指定された形式を適用します。 |
継承されるメソッド
このクラスは、次のクラスからメソッドを継承します-
- spark.components.supportClasses.SkinnableTextBase
- spark.components.supportClasses.SkinnableComponent
- mx.core.UIComponent
- mx.core.FlexSprite
- flash.display.Sprite
- flash.display.DisplayObjectContainer
- flash.display.InteractiveObject
- flash.display.DisplayObject
- flash.events.EventDispatcher
- 対象
Flex TextAreaコントロールの例
テストアプリケーションを作成して、FlexアプリケーションでTextAreaコントロールの使用を確認するには、次の手順に従います。
Step | Description |
---|---|
1 | Create a project with a name HelloWorld under a package com.finddevguides.client as explained in the Flex - Create Application chapter. |
2 | Modify HelloWorld.mxml as explained below. Keep rest of the files unchanged. |
3 | Compile and run the application to make sure business logic is working as per the requirements. |
以下は、変更されたmxmlファイル src/com.finddevguides/HelloWorld.mxml の内容です。
すべての変更が完了したら、link:/flex/flex_create_application [Flex-アプリケーションの作成]の章で行ったように、アプリケーションを通常モードでコンパイルして実行します。 アプリケーションに問題がない場合は、次の結果が生成されます。