From 373dcfc76ea8b44c8059c12d21f5fbcde513f3e4 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 7 Jul 2022 20:41:49 +0200 Subject: [PATCH] docs(checkbox): describe how to get the checkbox's the state --- docs/widgets/core/checkbox.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/widgets/core/checkbox.md b/docs/widgets/core/checkbox.md index 99a54fcdb..aba205612 100644 --- a/docs/widgets/core/checkbox.md +++ b/docs/widgets/core/checkbox.md @@ -30,6 +30,8 @@ lv_obj_clear_state(cb, LV_STATE_CHECKED); /*MAke the checkbox unchecked*/ lv_obj_add_state(cb, LV_STATE_CHECKED | LV_STATE_DISABLED); /*Make the checkbox checked and disabled*/ ``` +To get whether the checkbox is cehcked or not use: `lv_obj_has_state(cb, LV_STATE_CHECKED)`. + ## Events - `LV_EVENT_VALUE_CHANGED` Sent when the checkbox is toggled. - `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` are sent for the following types: