Comments (5)
Actually lv_button_bind_checked
should work for buttons, switches and checkboxes too. It just binds the LV_STATE_CHECKED
state of the widget. I think we should rather call this function lv_obj_bind_checked
. What do you think?
cc @liamHowatt
from lvgl.
@liamHowatt It seems all good. Could you send a PR?
from lvgl.
Switch and checkbox are checkable by default. lv_obj_add_flag(btn, LV_OBJ_FLAG_CHECKABLE)
is needed before lv_button_bind_checked
on a button. Meanwhile lv_button_bind_checked
works "out of the box" on checkboxes. Since there's nothing about the implementation of lv_button_bind_checked
that relies on anything button-specific, and works "out of the box" on those widgets other than button, yes I think it's a good idea to rename it to lv_obj_bind_checked
.
Might be good to mention the LV_OBJ_FLAG_CHECKABLE
flag in the docstring of lv_obj_bind_checked
.
from lvgl.
We need some feedback on this issue.
Now we mark this as "stale" because there was no activity here for 14 days.
Remove the "stale" label or comment else this will be closed in 7 days.
from lvgl.
The Pull request is merged. Closing this issue.
from lvgl.
Related Issues (20)
- parameter types of functions in lv_obj_style_gen.h are incorrect HOT 20
- When different font sizes are set for LV_PART_MAIN and LV_PART_SELECTED of lv_roller, the text display position of the LV_PART_SELECTED section will be slightly higher. HOT 4
- How to prohibit a specified color from appearing inside the lvgl HOT 6
- LV Roller text is not centered. HOT 4
- lv_event_get_target(e) is a void method visual studio simulator HOT 1
- Missing header file lfs.h HOT 3
- Compilation error for FATFS HOT 6
- Unable to change new PNG picture on loop HOT 4
- Core panic'ed lv_slider_set_value 8.4 HOT 4
- lv_label_set_text_fmt formats certain doubles wrong HOT 3
- Unable to load image from SD card - text file loads fine with `lv_fs_read` HOT 2
- LVGL Docs Page Broken For Older Versions HOT 1
- In the master branch, sliding the interface on the edge will cause lvgl to get stuck and cannot be operated anymore HOT 2
- Strange behavior ans crash with use of tabview HOT 5
- Add back CONFIG_LV_COLOR_16_SWAP HOT 10
- Progress bar is rendering incorrectly. HOT 7
- Documentation examples do not load in Chrome OSX when selected branch is master HOT 4
- Cannot rotate image when loaded line by line HOT 1
- https://docs.lvgl.io/8.3/ (and all prior to 9.1) link leads to 404 HOT 13
- snapshot question HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lvgl.