App:Library:LVGL:docs:Widgets:Button (lv btn)

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

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

Button (lv_btn)

Overview

英文 自動翻訳

Buttons have no new features compared to the Base object. They are useful for semantic purposes and have slightly different default settings.

Buttons, by default, differ from Base object in the following ways:

  • Not scrollable
  • Added to the default group
  • Default height and width set to LV_SIZE_CONTENT


ボタンには、 Baseオブジェクトと比較して新しい機能はありません。これらはセマンティックの目的に役立ち、デフォルト設定がわずかに異なります。

デフォルトでは、ボタンは次の点でBaseオブジェクトとは異なります。

  • スクロール不可
  • デフォルトグループに追加
  • デフォルトの高さと幅はLV_SIZE_CONTENTに設定されています
戻る : Previous


Parts and Styles

英文 自動翻訳
  • LV_PART_MAIN The background of the button. Uses the typical background style properties.
  • LV_PART_MAINボタンの背景。一般的な背景スタイルのプロパティを使用します。
戻る : Previous


Usage

英文 自動翻訳

There are no new features compared to Base object.

Baseオブジェクトと比較して新しい機能はありません。
戻る : Previous


Events

英文 自動翻訳
  • LV_EVENT_VALUE_CHANGED when the LV_OBJ_FLAG_CHECKABLE flag is enabled and the object is clicked. The event happens on transition to/from the checked state.

Learn more about Events.

  • LV_EVENT_VALUE_CHANGEDと比較して新しい機能はありません。これらはセマンティックの目的に役立ち、デフォルト設定がわずかに異なります。LV_OBJ_FLAG_CHECKABLEフラグが有効で、オブジェクトがクリックされたとき。このイベントは、チェック状態への移行またはチェック状態からの移行時に発生します。

イベントの詳細をご覧ください。

戻る : Previous


Keys

英文 自動翻訳

Note that the state of LV_KEY_ENTER is translated to LV_EVENT_PRESSED/PRESSING/RELEASED etc.

See the events of the Base object too.

Learn more about Keys.

LV_KEY_ENTERの状態はLV_EVENT_PRESSED/PRESSING/RELEASED等に変換されることに注意してください。

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

キーの詳細をご覧ください。

戻る : Previous


Example

英文 自動翻訳

Simple Buttons

LVGL docs example 052.png

Styling buttons

LVGL docs example 053.png

Gummy button

LVGL docs example 054.png

戻る : Previous


API

英文 自動翻訳

Functions

lv_obj_t *lv_btn_create(lv_obj_t *parent)

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

Variables

const lv_obj_class_t lv_btn_class

struct lv_btn_t

Public Members
lv_obj_t obj


機能

lv_obj_t * lv_btn_create( lv_obj_t * parent)

ボタンオブジェクトを作成する
パラメーター
-オブジェクトへのポインタ。新しいボタンの親になります
戻り値
作成されたボタンへのポインタ

変数

const lv_obj_class_t lv_btn_class

struct lv_btn_t

パブリックメンバー
lv_obj_t obj


戻る : Previous