Important: unclear posts may not receive useful answers.
Before posting
- Get familiar with Markdown to format and structure your post
- Be sure to update lvgl from the latest version from the
master
branch.- Be sure you have checked the relevant part of the documentation.
- If applicable use the Simulator to eliminate hardware related issues.
Description
What MCU/Processor/Board and compiler are you using?
Windows10 by CodeBlocks
What LVGL version are you using?
Version 8.0.0
What do you want to achieve?
I wish to set roller’s options 256 options.
But it can set only 62 options maximum.
What have you tried so far?
I tried set roller’s option to 62 options it can display well.
However when set options to 63 options it can’t display.
Code to reproduce
The code block(s) should be formatted like:
static void event_handler(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t * obj = lv_event_get_target(e);
if(code == LV_EVENT_VALUE_CHANGED) {
char buf[32];
lv_roller_get_selected_str(obj, buf, sizeof(buf));
LV_LOG_USER("Selected month: %s\n", buf);
}
}
// "V1\nV2\nV3\nV4\nV5\nV6\nV7\nV8\nV9\nV10\nV11\nV12\nV13\nV14\nV15\nV16\nV17\nV18\nV19\nV20\nV21\nV22\nV23\nV24\nV25\nV26\nV27\nV28\nV29\nV30\nV31\nV32\nV33\nV34\nV35\nV36\nV37\nV38\nV39\nV40\nV41\nV42\nV43\nV44\nV45\nV46\nV47\nV48\nV49\nV50\nV51\nV52\nV53\nV54\nV55\nV56\nV57\nV58\nV59\nV60\nV61\nV62\nV63\nV64\nV65\nV66\nV67\nV68\nV69\nV70\nV71\nV72\nV73\nV74\nV75\nV76\nV77\nV78\nV79\nV80\nV81\nV82\nV83\nV84\nV85\nV86\nV87\nV88\nV89\nV90\nV91\nV92\nV93\nV94\nV95\nV96\nV97\nV98\nV99\nV100\nV101\nV102\nV103\nV104\nV105\nV106\nV107\nV108\nV109\nV110\nV111\nV112\nV113\nV114\nV115\nV116\nV117\nV118\nV119\nV120\nV121\nV122\nV123\nV124\nV125\nV126\nV127\nV128\nV129\nV130\nV131\nV132\nV133\nV134\nV135\nV136\nV137\nV138\nV139\nV140\nV141\nV142\nV143\nV144\nV145\nV146\nV147\nV148\nV149\nV150\nV151\nV152\nV153\nV154\nV155\nV156\nV157\nV158\nV159\nV160\nV161\nV162\nV163\nV164\nV165\nV166\nV167\nV168\nV169\nV170\nV171\nV172\nV173\nV174\nV175\nV176\nV177\nV178\nV179\nV180\nV181\nV182\nV183\nV184\nV185\nV186\nV187\nV188\nV189\nV190\nV191\nV192\nV193\nV194\nV195\nV196\nV197\nV198\nV199\nV200\nV201\nV202\nV203\nV204\nV205\nV206\nV207\nV208\nV209\nV210\nV211\nV212\nV213\nV214\nV215\nV216\nV217\nV218\nV219\nV220\nV221\nV222\nV223\nV224\nV225\nV226\nV227\nV228\nV229\nV230\nV231\nV232\nV233\nV234\nV235\nV236\nV237\nV238\nV239\nV240\nV241\nV242\nV243\nV244\nV245\nV246\nV247\nV248\nV249\nV250\nV251\nV252\nV253\nV254\nV255\nV256",
/**
* An infinite roller with the name of the months
*/
void lv_example_roller_1(void)
{
lv_obj_t *roller1 = lv_roller_create(lv_scr_act());
lv_roller_set_options(roller1,
"V1\nV2\nV3\nV4\nV5\nV6\nV7\nV8\nV9\nV10\nV11\nV12\nV13\nV14\nV15\nV16\nV17\nV18\nV19\nV20\nV21\nV22\nV23\nV24\nV25\nV26\nV27\nV28\nV29\nV30\nV31\nV32\nV33\nV34\nV35\nV36\nV37\nV38\nV39\nV40\nV41\nV42\nV43\nV44\nV45\nV46\nV47\nV48\nV49\nV50\nV51\nV52\nV53\nV54\nV55\nV56\nV57\nV58\nV59\nV60\nV61\nV62nV63",
LV_ROLLER_MODE_INFINITE);
lv_roller_set_visible_row_count(roller1, 4);
lv_obj_center(roller1);
lv_obj_add_event_cb(roller1, event_handler, LV_EVENT_ALL, NULL);
}
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.
The roller 62 options can display.
When tested by 63 options , it can’t display anything.