超过屏幕的部分,显示不出来
离线
通过Tab得到焦点的控件的底部坐标如果超父控件器大小,就滑动以使其底部坐标在父控件之内。
可以搞个实例看看吗,是回调里试下吗
//Write codes DataStream_table_1
DataStream_table_1 = lv_table_create(m_wnd);
lv_obj_set_pos(DataStream_table_1, 0, 0);
lv_obj_set_size(DataStream_table_1, 480, 220);
lv_table_set_col_width(DataStream_table_1, 0, 340);
lv_table_set_col_width(DataStream_table_1, 1, 130);
lv_table_set_cell_value(DataStream_table_1,0,0,"Name");
lv_table_set_cell_value(DataStream_table_1,1,0,"Speed");
lv_table_set_cell_value(DataStream_table_1,2,0,"Banana");
lv_table_set_cell_value(DataStream_table_1,3,0,"Citron");
lv_table_set_cell_value(DataStream_table_1,4,0,"Name1");
lv_table_set_cell_value(DataStream_table_1,5,0,"Name2");
lv_table_set_cell_value(DataStream_table_1,6,0,"Name3");
lv_table_set_cell_value(DataStream_table_1,7,0,"Name4");
lv_table_set_cell_value(DataStream_table_1,8,0,"Name5");
lv_table_set_cell_value(DataStream_table_1,9,0,"Name6");
lv_table_set_cell_value(DataStream_table_1,0,1,"Value");
lv_table_set_cell_value(DataStream_table_1,1,1,"68.5 km/h");
lv_table_set_cell_value(DataStream_table_1,3,1,"$3");
lv_table_set_cell_value(DataStream_table_1,4,1,"Price1");
lv_table_set_cell_value(DataStream_table_1,5,1,"Price2");
lv_table_set_cell_value(DataStream_table_1,6,1,"Price3");
lv_table_set_cell_value(DataStream_table_1,7,1,"Price4");
lv_table_set_cell_value(DataStream_table_1,8,1,"Price5");
lv_table_set_cell_value(DataStream_table_1,9,1,"Price6");
lv_obj_add_event_cb(DataStream_table_1, DataStream_table_1_event_handler, LV_EVENT_KEY, NULL);
lv_group_add_obj(groupRect_Diag, DataStream_table_1);//绑定组
离线
我以为你是说按Tab键滑动,理解错了。
让Table控件接收KEY事件,在事件处理函数里调用API滑动就行了。
没理解是什么意思
离线
@海石生风
没整明白,API里面好像没有找到
离线