App:Library:LVGL:docs:Widgets:Text area (lv textarea)

提供: robot-jp wiki
ナビゲーションに移動検索に移動

https://docs.lvgl.io/8.2/widgets/core/arc.html

Text area (lv_textarea)

Overview

英文 自動翻訳

The Text Area is a Base object with a Label and a cursor on it.

Texts or characters can be added to it.

Long lines are wrapped and when the text becomes long enough the Text area can be scrolled.

One line mode and password modes are supported.

テキストエリアは、ラベルとカーソルが描かれたベースオブジェクトです。

テキストや文字は、そこに追加することができます。

長い行は折り返され、十分な長さになるとテキストエリアはスクロールすることができます。

1行モードとパスワードモードに対応しています。

戻る : Previous


Parts and Styles

英文 自動翻訳
  • LV_PART_MAIN The background of the text area. Uses all the typical background style properties and the text related style properties including text_align to align the text to the left, right or center.
  • LV_PART_SCROLLBAR The scrollbar that is shown when the text is too long.
  • LV_PART_SELECTED Determines the style of the selected text. Only text_color and bg_color style properties can be used. bg_color should be set directly on the label of the text area.
  • LV_PART_CURSOR Marks the position where the characters are inserted. The cursor's area is always the bounding box of the current character. A block cursor can be created by adding a background color and background opacity to LV_PART_CURSOR's style. The create line cursor leave the cursor transparent and set a left border. The anim_time style property sets the cursor's blink time.
  • LV_PART_TEXTAREA_PLACEHOLDER Unique to Text Area, allows styling the placeholder text.
  • LV_PART_MAIN テキストエリアの背景。一般的な背景のスタイルプロパティと、テキストを左、右、中央に配置するためのtext_alignなどのテキスト関連のスタイルプロパティをすべて使用します。
  • LV_PART_SCROLLBAR テキストが長すぎる場合に表示されるスクロールバーです。
  • LV_PART_SELECTED 選択されたテキストのスタイルを決定します。text_colorbg_color のスタイルプロパティのみ使用可能です。bg_color はテキストエリアのラベルに直接設定してください。
  • LV_PART_CURSOR 文字が挿入される位置をマークする。カーソルの領域は、常に現在の文字のバウンディングボックスとなる。LV_PART_CURSORのスタイルに背景色と背景の不透明度を追加すると、ブロックカーソルを作成することができます。ラインカーソルの作成は、カーソルを透明のままにして、左ボーダーを設定します。anim_time styleプロパティはカーソルのブリンク時間を設定します。
  • LV_PART_TEXTAREA_PLACEHOLDER テキストエリアに固有のプロパティで、プレースホルダーのテキストをスタイル設定することができます。
戻る : Previous


Usage

Add text

英文 自動翻訳

You can insert text or characters to the current cursor's position with:

  • lv_textarea_add_char(textarea, 'c')
  • lv_textarea_add_text(textarea, "insert this text")

To add wide characters like 'á', 'ß' or CJK characters use lv_textarea_add_text(ta, "á").

lv_textarea_set_text(ta, "New text") changes the whole text.

現在のカーソル位置にテキストまたは文字を挿入するには、次のようにします。
  • lv_textarea_add_char(textarea, 'c')
  • lv_textarea_add_text(textarea, "insert this text")

'á'、'ß'、またはCJK文字のようなワイド文字を追加するには、lv_textarea_add_text (タ、"á")を使用します。

lv_textarea_set_text (ta 「新しいテキスト」)は、テキスト全体を変更します。

戻る : Previous


Placeholder

英文 自動翻訳

A placeholder text can be specified - which is displayed when the Text area is empty - with lv_textarea_set_placeholder_text(ta, "Placeholder text")

テキストエリアが空の時に表示されるプレースホルダテキストを指定するには、lv_textarea_set_placeholder_text(ta, "Placeholder text")を使用します。
戻る : Previous


Delete character

英文 自動翻訳

To delete a character from the left of the current cursor position use lv_textarea_del_char(textarea). To delete from the right use lv_textarea_del_char_forward(textarea)

現在のカーソル位置の左側から文字を削除するには lv_textarea_del_char(textarea) を使用します。右から削除するには lv_textarea_del_char_forward(textarea) を使用します。
戻る : Previous


Move the cursor

英文 自動翻訳

The cursor position can be modified directly like lv_textarea_set_cursor_pos(textarea, 10). The 0 position means "before the first characters", LV_TA_CURSOR_LAST means "after the last character"

You can step the cursor with

  • lv_textarea_cursor_right(textarea)
  • lv_textarea_cursor_left(textarea)
  • lv_textarea_cursor_up(textarea)
  • lv_textarea_cursor_down(textarea)


If lv_textarea_set_cursor_click_pos(textarea, true) is applied the cursor will jump to the position where the Text area was clicked.

カーソル位置はlv_textarea_set_cursor_pos(textarea, 10)のように直接変更することができます。0の位置は "最初の文字の前"、LV_TA_CURSOR_LASTは "最後の文字の後 "を意味します。

カーソルをステップさせるには

  • lv_textarea_cursor_right(textarea)
  • lv_textarea_cursor_left(textarea)
  • lv_textarea_cursor_up(textarea)
  • lv_textarea_cursor_down(textarea)


lv_textarea_set_cursor_click_pos(textarea, true) を適用すると、カーソルはテキストエリアがクリックされた位置にジャンプします。

戻る : Previous


Hide the cursor

英文 自動翻訳

The cursor is always visible, however it can be a good idea to style it to be visible only in LV_STATE_FOCUSED state.

カーソルは常に表示されますが、LV_STATE_FOCUSED 状態でのみ表示されるようにスタイルを設定するのもよいアイデアです。
戻る : Previous


One line mode

英文 自動翻訳

The Text area can be configured to be on a single line with lv_textarea_set_one_line(textarea, true).

In this mode the height is set automatically to show only one line, line break characters are ignored, and word wrap is disabled.

テキストエリアは lv_textarea_set_one_line(textarea, true) で1行に表示するように設定することができます。

このモードでは、高さは1行だけ表示されるように自動的に設定され、改行文字は無視され、ワードラップは無効にされます。

戻る : Previous


Password mode

英文 自動翻訳

The text area supports password mode which can be enabled with lv_textarea_set_password_mode(textarea, true).

If the (Bullet, U+2022) character exists in the font, the entered characters are converted to it after some time or when a new character is entered.

If not exists, * will be used.

In password mode lv_textarea_get_text(textarea) returns the actual text entered, not the bullet characters.

The visibility time can be adjusted with LV_TEXTAREA_DEF_PWD_SHOW_TIME) in lv_conf.h.

テキストエリアはパスワードモードに対応しており、 lv_textarea_set_password_mode(textarea, true) で有効にすることができます。

フォント内に - (Bullet, U+2022) 文字が存在する場合、入力された文字はしばらくしてから、または新しい文字が入力されたときに、この文字に変換されます。

もしが存在しない場合は * が使用されます。


パスワードモードでは、 lv_textarea_get_text(textarea) は、ビュレット文字ではなく、実際に入力されたテキストを返します。

表示時間は lv_conf.hLV_TEXTAREA_DEF_PWD_SHOW_TIME)で調整することができます。

戻る : Previous


Accepted characters

英文 自動翻訳

You can set a list of accepted characters with lv_textarea_set_accepted_chars(textarea, "0123456789.+-"). Other characters will be ignored.

lv_textarea_set_accepted_chars(textarea, "0123456789.+-") で、受け入れられる文字のリストを設定することができます。それ以外の文字は無視されます。
戻る : Previous


Max text length

英文 自動翻訳

The maximum number of characters can be limited with lv_textarea_set_max_length(textarea, max_char_num)

最大文字数はlv_textarea_set_max_length(textarea, max_char_num) で制限することができます。
戻る : Previous


Very long texts

英文 自動翻訳

If there is a very long text in the Text area (e.g. > 20k characters), scrolling and drawing might be slow. However, by enabling LV_LABEL_LONG_TXT_HINT   1 in lv_conf.h the performance can be hugely improved.

This will save some additional information about the label to speed up its drawing. Using LV_LABEL_LONG_TXT_HINT the scrolling and drawing will as fast as with "normal" short texts.

Textエリアに非常に長いテキストがある場合(例:20k文字以上)、スクロールや描画が遅くなることがあります。しかし、lv_conf.hLV_LABEL_LONG_TXT_HINT を1にして有効にすると、パフォーマンスが大幅に改善されます。

これは、ラベルに関するいくつかの追加情報を保存し、その描画を高速化するものです。LV_LABEL_LONG_TXT_HINT を使用すると、スクロールと描画は "通常の" 短いテキストと同じように速くなります。

戻る : Previous


Select text

英文 自動翻訳

Any part of the text can be selected if enabled with lv_textarea_set_text_selection(textarea, true).

This works much like when you select text on your PC with your mouse.

lv_textarea_set_text_selection(textarea, true) で有効にすると、テキストのどの部分でも選択できるようになります。

これは、PCでマウスを使ってテキストを選択するときと同じように動作します。

戻る : Previous


Events

英文 自動翻訳
  • LV_EVENT_INSERT Sent right before a character or text is inserted. The event parameter is the text about to be inserted. lv_textarea_set_insert_replace(textarea, "New text") replaces the text to insert. The new text cannot be in a local variable which is destroyed when the event callback exists. "" means do not insert anything.
  • LV_EVENT_VALUE_CHANGED Sent when the content of the text area has been changed.
  • LV_EVENT_READY Sent when LV_KEY_ENTER is pressed (or sent) to a one line text area.


See the events of the Base object too.

Learn more about Events.

  • LV_EVENT_INSERT 文字やテキストが挿入される直前に送信されます。イベントパラメータは、挿入されようとしているテキストです。lv_textarea_set_insert_replace(textarea, "New text") は、挿入されるテキストを置き換えます。新しいテキストは、イベントコールバックが存在するときに破棄されるローカル変数に入れることはできません。"" は何も挿入しないことを意味します。
  • LV_EVENT_VALUE_CHANGED テキストエリアのコンテンツが変更されたときに送信されます。
  • LV_EVENT_READY 1行のテキストエリアに対して LV_KEY_ENTER が押された (または送られた) 場合に送出されます。


Baseオブジェクトのイベントも参照してください。

イベントの詳細を確認してください。

戻る : Previous


Keys

英文 自動翻訳
  • LV_KEY_UP/DOWN/LEFT/RIGHT Move the cursor
  • Any character Add the character to the current cursor position


Learn more about Keys.

  • LV_KEY_UP/DOWN/LEFT/RIGHT カーソル移動
  • Any character 任意の文字 現在のカーソル位置に文字を追加する


キーの詳細を確認してください。

戻る : Previous


Example

英文 自動翻訳

Simple Text area

LVGL docs example 113.png

Text area with password field

LVGL docs example 114.png

Text auto-formatting

LVGL docs example 115.png

戻る : Previous


API

英文 自動翻訳

Enums

enum [anonymous]

Values:
enumerator LV_PART_TEXTAREA_PLACEHOLDER

Functions

LV_EXPORT_CONST_INT(LV_TEXTAREA_CURSOR_LAST)

lv_obj_t *lv_textarea_create(lv_obj_t *parent)

Create a text area object
Parameters
parent -- pointer to an object, it will be the parent of the new text area
Returns
pointer to the created text area

void lv_textarea_add_char(lv_obj_t *obj, uint32_t c)

Insert a character to the current cursor position. To add a wide char, e.g. 'Á' use _lv_txt_encoded_conv_wc('Á)`
Parameters
  • obj -- pointer to a text area object
  • c -- a character (e.g. 'a')

void lv_textarea_add_text(lv_obj_t *obj, const char *txt)

Insert a text to the current cursor position
Parameters
  • obj -- pointer to a text area object
  • txt -- a '\0' terminated string to insert

void lv_textarea_del_char(lv_obj_t *obj)

Delete a the left character from the current cursor position
Parameters
obj -- pointer to a text area object

void lv_textarea_del_char_forward(lv_obj_t *obj)

Delete the right character from the current cursor position
Parameters
obj -- pointer to a text area object

void lv_textarea_set_text(lv_obj_t *obj, const char *txt)

Set the text of a text area
Parameters
  • obj -- pointer to a text area object
  • txt -- pointer to the text

void lv_textarea_set_placeholder_text(lv_obj_t *obj, const char *txt)

Set the placeholder text of a text area
Parameters
  • obj -- pointer to a text area object
  • txt -- pointer to the text

void lv_textarea_set_cursor_pos(lv_obj_t *obj, int32_t pos)

Set the cursor position
Parameters
  • obj -- pointer to a text area object
  • pos -- the new cursor position in character index < 0 : index from the end of the text LV_TEXTAREA_CURSOR_LAST: go after the last character

void lv_textarea_set_cursor_click_pos(lv_obj_t *obj, bool en)

Enable/Disable the positioning of the cursor by clicking the text on the text area.
Parameters
  • obj -- pointer to a text area object
  • en -- true: enable click positions; false: disable

void lv_textarea_set_password_mode(lv_obj_t *obj, bool en)

Enable/Disable password mode
Parameters
  • obj -- pointer to a text area object
  • en -- true: enable, false: disable

void lv_textarea_set_one_line(lv_obj_t *obj, bool en)

Configure the text area to one line or back to normal
Parameters
  • obj -- pointer to a text area object
  • en -- true: one line, false: normal

void lv_textarea_set_accepted_chars(lv_obj_t *obj, const char *list)

Set a list of characters. Only these characters will be accepted by the text area
Parameters
  • obj -- pointer to a text area object
  • list -- list of characters. Only the pointer is saved. E.g. "+-.,0123456789"

void lv_textarea_set_max_length(lv_obj_t *obj, uint32_t num)

Set max length of a Text Area.
Parameters
  • obj -- pointer to a text area object
  • num -- the maximal number of characters can be added (lv_textarea_set_text ignores it)

void lv_textarea_set_insert_replace(lv_obj_t *obj, const char *txt)

In LV_EVENT_INSERT the text which planned to be inserted can be replaced by an other text. It can be used to add automatic formatting to the text area.
Parameters
  • obj -- pointer to a text area object
  • txt -- pointer to a new string to insert. If "" no text will be added. The variable must be live after the event_cb exists. (Should be global or static)

void lv_textarea_set_text_selection(lv_obj_t *obj, bool en)

Enable/disable selection mode.
Parameters
  • obj -- pointer to a text area object
  • en -- true or false to enable/disable selection mode

void lv_textarea_set_password_show_time(lv_obj_t *obj, uint16_t time)

Set how long show the password before changing it to '*'
Parameters
  • obj -- pointer to a text area object
  • time -- show time in milliseconds. 0: hide immediately.

void lv_textarea_set_align(lv_obj_t *obj, lv_text_align_t align)

Deprecated: use the normal text_align style property instead Set the label's alignment. It sets where the label is aligned (in one line mode it can be smaller than the text area) and how the lines of the area align in case of multiline text area
Parameters
  • obj -- pointer to a text area object
  • align -- the align mode from ::lv_text_align_t

const char *lv_textarea_get_text(const lv_obj_t *obj)

Get the text of a text area. In password mode it gives the real text (not '*'s).
Parameters
obj -- pointer to a text area object
Returns
pointer to the text

const char *lv_textarea_get_placeholder_text(lv_obj_t *obj)

Get the placeholder text of a text area
Parameters
obj -- pointer to a text area object
Returns
pointer to the text

lv_obj_t *lv_textarea_get_label(const lv_obj_t *obj)

Get the label of a text area
Parameters
obj -- pointer to a text area object
Returns
pointer to the label object

uint32_t lv_textarea_get_cursor_pos(const lv_obj_t *obj)

Get the current cursor position in character index
Parameters
obj -- pointer to a text area object
Returns
the cursor position

bool lv_textarea_get_cursor_click_pos(lv_obj_t *obj)

Get whether the cursor click positioning is enabled or not.
Parameters
obj -- pointer to a text area object
Returns
true: enable click positions; false: disable

bool lv_textarea_get_password_mode(const lv_obj_t *obj)

Get the password mode attribute
Parameters
obj -- pointer to a text area object
Returns
true: password mode is enabled, false: disabled

bool lv_textarea_get_one_line(const lv_obj_t *obj)

Get the one line configuration attribute
Parameters
obj -- pointer to a text area object
Returns
true: one line configuration is enabled, false: disabled

const char *lv_textarea_get_accepted_chars(lv_obj_t *obj)

Get a list of accepted characters.
Parameters
obj -- pointer to a text area object
Returns
list of accented characters.

uint32_t lv_textarea_get_max_length(lv_obj_t *obj)

Get max length of a Text Area.
Parameters
obj -- pointer to a text area object
Returns
the maximal number of characters to be add

bool lv_textarea_text_is_selected(const lv_obj_t *obj)

Find whether text is selected or not.
Parameters
obj -- pointer to a text area object
Returns
whether text is selected or not

bool lv_textarea_get_text_selection(lv_obj_t *obj)

Find whether selection mode is enabled.
Parameters
obj -- pointer to a text area object
Returns
true: selection mode is enabled, false: disabled

uint16_t lv_textarea_get_password_show_time(lv_obj_t *obj)

Set how long show the password before changing it to '*'
Parameters
obj -- pointer to a text area object
Returns
show time in milliseconds. 0: hide immediately.

void lv_textarea_clear_selection(lv_obj_t *obj)

Clear the selection on the text area.
Parameters
obj -- pointer to a text area object

void lv_textarea_cursor_right(lv_obj_t *obj)

Move the cursor one character right
Parameters
obj -- pointer to a text area object

void lv_textarea_cursor_left(lv_obj_t *obj)

Move the cursor one character left
Parameters
obj -- pointer to a text area object

void lv_textarea_cursor_down(lv_obj_t *obj)

Move the cursor one line down
Parameters
obj -- pointer to a text area object

void lv_textarea_cursor_up(lv_obj_t *obj)

Move the cursor one line up
Parameters
obj -- pointer to a text area object

Variables

const lv_obj_class_t lv_textarea_class

struct lv_textarea_t

Public Members
lv_obj_t obj
lv_obj_t *label
char *placeholder_txt
char *pwd_tmp
const char *accepted_chars
uint32_t max_length
uint16_t pwd_show_time
lv_coord_t valid_x
uint32_t pos
lv_area_t area
uint32_t txt_byte_pos
uint8_t show
uint8_t click_pos
struct lv_textarea_t::[anonymous] cursor
uint32_t sel_start
uint32_t sel_end
uint8_t text_sel_in_prog
uint8_t text_sel_en
uint8_t pwd_mode
uint8_t one_line
Enums

enum [anonymous]

Values:
enumerator LV_PART_TEXTAREA_PLACEHOLDER

Functions

LV_EXPORT_CONST_INT(LV_TEXTAREA_CURSOR_LAST)

lv_obj_t *lv_textarea_create(lv_obj_t *parent)

Create a text area object
Parameters
parent -- pointer to an object, it will be the parent of the new text area
Returns
pointer to the created text area

void lv_textarea_add_char(lv_obj_t *obj, uint32_t c)

Insert a character to the current cursor position. To add a wide char, e.g. 'Á' use _lv_txt_encoded_conv_wc('Á)`
Parameters
  • obj -- pointer to a text area object
  • c -- a character (e.g. 'a')

void lv_textarea_add_text(lv_obj_t *obj, const char *txt)

Insert a text to the current cursor position
Parameters
  • obj -- pointer to a text area object
  • txt -- a '\0' terminated string to insert

void lv_textarea_del_char(lv_obj_t *obj)

Delete a the left character from the current cursor position
Parameters
obj -- pointer to a text area object

void lv_textarea_del_char_forward(lv_obj_t *obj)

Delete the right character from the current cursor position
Parameters
obj -- pointer to a text area object

void lv_textarea_set_text(lv_obj_t *obj, const char *txt)

Set the text of a text area
Parameters
  • obj -- pointer to a text area object
  • txt -- pointer to the text

void lv_textarea_set_placeholder_text(lv_obj_t *obj, const char *txt)

Set the placeholder text of a text area
Parameters
  • obj -- pointer to a text area object
  • txt -- pointer to the text

void lv_textarea_set_cursor_pos(lv_obj_t *obj, int32_t pos)

Set the cursor position
Parameters
  • obj -- pointer to a text area object
  • pos -- the new cursor position in character index < 0 : index from the end of the text LV_TEXTAREA_CURSOR_LAST: go after the last character

void lv_textarea_set_cursor_click_pos(lv_obj_t *obj, bool en)

Enable/Disable the positioning of the cursor by clicking the text on the text area.
Parameters
  • obj -- pointer to a text area object
  • en -- true: enable click positions; false: disable

void lv_textarea_set_password_mode(lv_obj_t *obj, bool en)

Enable/Disable password mode
Parameters
  • obj -- pointer to a text area object
  • en -- true: enable, false: disable

void lv_textarea_set_one_line(lv_obj_t *obj, bool en)

Configure the text area to one line or back to normal
Parameters
  • obj -- pointer to a text area object
  • en -- true: one line, false: normal

void lv_textarea_set_accepted_chars(lv_obj_t *obj, const char *list)

Set a list of characters. Only these characters will be accepted by the text area
Parameters
  • obj -- pointer to a text area object
  • list -- list of characters. Only the pointer is saved. E.g. "+-.,0123456789"

void lv_textarea_set_max_length(lv_obj_t *obj, uint32_t num)

Set max length of a Text Area.
Parameters
  • obj -- pointer to a text area object
  • num -- the maximal number of characters can be added (lv_textarea_set_text ignores it)

void lv_textarea_set_insert_replace(lv_obj_t *obj, const char *txt)

In LV_EVENT_INSERT the text which planned to be inserted can be replaced by an other text. It can be used to add automatic formatting to the text area.
Parameters
  • obj -- pointer to a text area object
  • txt -- pointer to a new string to insert. If "" no text will be added. The variable must be live after the event_cb exists. (Should be global or static)

void lv_textarea_set_text_selection(lv_obj_t *obj, bool en)

Enable/disable selection mode.
Parameters
  • obj -- pointer to a text area object
  • en -- true or false to enable/disable selection mode

void lv_textarea_set_password_show_time(lv_obj_t *obj, uint16_t time)

Set how long show the password before changing it to '*'
Parameters
  • obj -- pointer to a text area object
  • time -- show time in milliseconds. 0: hide immediately.

void lv_textarea_set_align(lv_obj_t *obj, lv_text_align_t align)

Deprecated: use the normal text_align style property instead Set the label's alignment. It sets where the label is aligned (in one line mode it can be smaller than the text area) and how the lines of the area align in case of multiline text area
Parameters
  • obj -- pointer to a text area object
  • align -- the align mode from ::lv_text_align_t

const char *lv_textarea_get_text(const lv_obj_t *obj)

Get the text of a text area. In password mode it gives the real text (not '*'s).
Parameters
obj -- pointer to a text area object
Returns
pointer to the text

const char *lv_textarea_get_placeholder_text(lv_obj_t *obj)

Get the placeholder text of a text area
Parameters
obj -- pointer to a text area object
Returns
pointer to the text

lv_obj_t *lv_textarea_get_label(const lv_obj_t *obj)

Get the label of a text area
Parameters
obj -- pointer to a text area object
Returns
pointer to the label object

uint32_t lv_textarea_get_cursor_pos(const lv_obj_t *obj)

Get the current cursor position in character index
Parameters
obj -- pointer to a text area object
Returns
the cursor position

bool lv_textarea_get_cursor_click_pos(lv_obj_t *obj)

Get whether the cursor click positioning is enabled or not.
Parameters
obj -- pointer to a text area object
Returns
true: enable click positions; false: disable

bool lv_textarea_get_password_mode(const lv_obj_t *obj)

Get the password mode attribute
Parameters
obj -- pointer to a text area object
Returns
true: password mode is enabled, false: disabled

bool lv_textarea_get_one_line(const lv_obj_t *obj)

Get the one line configuration attribute
Parameters
obj -- pointer to a text area object
Returns
true: one line configuration is enabled, false: disabled

const char *lv_textarea_get_accepted_chars(lv_obj_t *obj)

Get a list of accepted characters.
Parameters
obj -- pointer to a text area object
Returns
list of accented characters.

uint32_t lv_textarea_get_max_length(lv_obj_t *obj)

Get max length of a Text Area.
Parameters
obj -- pointer to a text area object
Returns
the maximal number of characters to be add

bool lv_textarea_text_is_selected(const lv_obj_t *obj)

Find whether text is selected or not.
Parameters
obj -- pointer to a text area object
Returns
whether text is selected or not

bool lv_textarea_get_text_selection(lv_obj_t *obj)

Find whether selection mode is enabled.
Parameters
obj -- pointer to a text area object
Returns
true: selection mode is enabled, false: disabled

uint16_t lv_textarea_get_password_show_time(lv_obj_t *obj)

Set how long show the password before changing it to '*'
Parameters
obj -- pointer to a text area object
Returns
show time in milliseconds. 0: hide immediately.

void lv_textarea_clear_selection(lv_obj_t *obj)

Clear the selection on the text area.
Parameters
obj -- pointer to a text area object

void lv_textarea_cursor_right(lv_obj_t *obj)

Move the cursor one character right
Parameters
obj -- pointer to a text area object

void lv_textarea_cursor_left(lv_obj_t *obj)

Move the cursor one character left
Parameters
obj -- pointer to a text area object

void lv_textarea_cursor_down(lv_obj_t *obj)

Move the cursor one line down
Parameters
obj -- pointer to a text area object

void lv_textarea_cursor_up(lv_obj_t *obj)

Move the cursor one line up
Parameters
obj -- pointer to a text area object

Variables

const lv_obj_class_t lv_textarea_class

struct lv_textarea_t

Public Members
lv_obj_t obj
lv_obj_t *label
char *placeholder_txt
char *pwd_tmp
const char *accepted_chars
uint32_t max_length
uint16_t pwd_show_time
lv_coord_t valid_x
uint32_t pos
lv_area_t area
uint32_t txt_byte_pos
uint8_t show
uint8_t click_pos
struct lv_textarea_t::[anonymous] cursor
uint32_t sel_start
uint32_t sel_end
uint8_t text_sel_in_prog
uint8_t text_sel_en
uint8_t pwd_mode
uint8_t one_line


戻る : Previous