App:Library:LVGL:docs:Overview:Objects
提供: robot-jp wiki
ナビゲーションに移動検索に移動https://docs.lvgl.io/8.2/overview/object.html
英文 | 自動翻訳 |
---|---|
Objects
In LVGL the basic building blocks of a user interface are the objects, also called Widgets. For example a Button, Label, Image, List, Chart or Text area.
You can see all the Object types here.
All objects are referenced using an lv_obj_t
pointer as a handle. This pointer can later be used to set or get the attributes of the object.
Attributes
Basic attributes
All object types share some basic attributes:
- Position
- Size
- Parent
- Styles
- Event handlers
- Etc
You can set/get these attributes with lv_obj_set_...
and lv_obj_get_...
functions. For example:
/*Set basic object attributes*/ lv_obj_set_size(btn1, 100, 50); /*Set a button's size*/ lv_obj_set_pos(btn1, 20,30); /*Set a button's position*/
To see all the available functions visit the Base object's documentation.