当前位置: 首页 > wzjs >正文

免费网站模板怎么做网站广告投放公司

免费网站模板怎么做网站,广告投放公司,广西建设厅网站地址,如何用微信小程序做网站这一期讲解lvgl中下拉框的基础使用,下拉列表允许用户从选项列表中选择一个值,下拉列表的选项表默认是关闭的,其中的选项可以是单个值或预定义文本。 当单击下拉列表后,其将创建一个列表,用户可以从中选择一个选项。 当…

这一期讲解lvgl中下拉框的基础使用,下拉列表允许用户从选项列表中选择一个值,下拉列表的选项表默认是关闭的,其中的选项可以是单个值或预定义文本。 当单击下拉列表后,其将创建一个列表,用户可以从中选择一个选项。 当用户选择了一个值后,该列表将被删除,下次点击会再重新生成。总而言之,下拉框控件是由按键与列表组成的控件。
使用GUI_Guider软件在工具栏将下拉框拖拽到界面中,以下是下拉框的默认样式:
在这里插入图片描述
在右侧的属性列表中,下拉框分为三个模块分别是main主模块、selected选择模块、list列表模块、scrollbar滚轮模块。

以下图片是main主模块的使用,可以分别配置控件的主颜色、字体颜色以及边框等设置。
在这里插入图片描述
以下图片是selected选择模块的使用,主要用来设置点击下拉框后,选中条的属性设置,分别有选中的边框粗细以及颜色的设置。
在这里插入图片描述
以下指的是列表的属性设置具体有列表背景颜色、边框大小以及字体设置,最后的高度指的是列表展开的长度设置。
在这里插入图片描述
以下是scrollbar滚轮模块的使用,主要用来设置右侧滚动条的颜色以及粗细。
在这里插入图片描述
以下是下拉框的相关生成代码:
//Write codes screen_1_ddlist_1
ui->screen_1_ddlist_1 = lv_dropdown_create(ui->screen_1);
//设置列表元素
lv_dropdown_set_options(ui->screen_1_ddlist_1, “list1\nlist2\nlist3”);
//设置列表位置以及大小
lv_obj_set_pos(ui->screen_1_ddlist_1, 144, 187);
lv_obj_set_size(ui->screen_1_ddlist_1, 168, 31);

//Write style for screen_1_ddlist_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
//设置文本颜色
lv_obj_set_style_text_color(ui->screen_1_ddlist_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
//设置文本字体
lv_obj_set_style_text_font(ui->screen_1_ddlist_1, &lv_font_SourceHanSerifSC_Regular_12, LV_PART_MAIN|LV_STATE_DEFAULT);
//设置文本透明度
lv_obj_set_style_text_opa(ui->screen_1_ddlist_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//设置边框宽度
lv_obj_set_style_border_width(ui->screen_1_ddlist_1, 1, LV_PART_MAIN|LV_STATE_DEFAULT);
//设置边框透明度
lv_obj_set_style_border_opa(ui->screen_1_ddlist_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//设置边框颜色
lv_obj_set_style_border_color(ui->screen_1_ddlist_1, lv_color_hex(0xe1e6ee), LV_PART_MAIN|LV_STATE_DEFAULT);
//设置边框类型
lv_obj_set_style_border_side(ui->screen_1_ddlist_1, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
//设置边框内边距
lv_obj_set_style_pad_top(ui->screen_1_ddlist_1, 8, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_left(ui->screen_1_ddlist_1, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_pad_right(ui->screen_1_ddlist_1, 6, LV_PART_MAIN|LV_STATE_DEFAULT);
//设置边框圆角半径
lv_obj_set_style_radius(ui->screen_1_ddlist_1, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
//设置背景透明度
lv_obj_set_style_bg_opa(ui->screen_1_ddlist_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
//设置背景颜色
lv_obj_set_style_bg_color(ui->screen_1_ddlist_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
//设置背景渐变方向
lv_obj_set_style_bg_grad_dir(ui->screen_1_ddlist_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
//设置阴影宽度
lv_obj_set_style_shadow_width(ui->screen_1_ddlist_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

//Write style state: LV_STATE_CHECKED for &style_screen_1_ddlist_1_extra_list_selected_checked
static lv_style_t style_screen_1_ddlist_1_extra_list_selected_checked;
ui_init_style(&style_screen_1_ddlist_1_extra_list_selected_checked);

//设置边框宽度
lv_style_set_border_width(&style_screen_1_ddlist_1_extra_list_selected_checked, 1);

//设置边框透明度

lv_style_set_border_opa(&style_screen_1_ddlist_1_extra_list_selected_checked, 255);
//设置边框颜色
lv_style_set_border_color(&style_screen_1_ddlist_1_extra_list_selected_checked, lv_color_hex(0xe1e6ee));
//设置边框类型
lv_style_set_border_side(&style_screen_1_ddlist_1_extra_list_selected_checked, LV_BORDER_SIDE_FULL);
//设置边框圆角半径
lv_style_set_radius(&style_screen_1_ddlist_1_extra_list_selected_checked, 3);
//设置背景透明度
lv_style_set_bg_opa(&style_screen_1_ddlist_1_extra_list_selected_checked, 255);
//设置背景颜色
lv_style_set_bg_color(&style_screen_1_ddlist_1_extra_list_selected_checked, lv_color_hex(0x00a1b5));
//设置背景渐变方向
lv_style_set_bg_grad_dir(&style_screen_1_ddlist_1_extra_list_selected_checked, LV_GRAD_DIR_NONE);
//将样式应用于下拉列表的选中项
lv_obj_add_style(lv_dropdown_get_list(ui->screen_1_ddlist_1), &style_screen_1_ddlist_1_extra_list_selected_checked, LV_PART_SELECTED|LV_STATE_CHECKED);

//Write style state: LV_STATE_DEFAULT for &style_screen_1_ddlist_1_extra_list_main_default
static lv_style_t style_screen_1_ddlist_1_extra_list_main_default;
ui_init_style(&style_screen_1_ddlist_1_extra_list_main_default);
//设置最大高度

lv_style_set_max_height(&style_screen_1_ddlist_1_extra_list_main_default, 90);
//设置文本颜色
lv_style_set_text_color(&style_screen_1_ddlist_1_extra_list_main_default, lv_color_hex(0x0D3055));
//设置字体类型
lv_style_set_text_font(&style_screen_1_ddlist_1_extra_list_main_default, &lv_font_montserratMedium_12);
//设置文本透明度
lv_style_set_text_opa(&style_screen_1_ddlist_1_extra_list_main_default, 255);

//设置边框宽度
lv_style_set_border_width(&style_screen_1_ddlist_1_extra_list_main_default, 1);
//设置边框透明度
lv_style_set_border_opa(&style_screen_1_ddlist_1_extra_list_main_default, 255);
//设置边框颜色
lv_style_set_border_color(&style_screen_1_ddlist_1_extra_list_main_default, lv_color_hex(0xe1e6ee));
//设置边框类型
lv_style_set_border_side(&style_screen_1_ddlist_1_extra_list_main_default, LV_BORDER_SIDE_FULL);
//设置圆角半径
lv_style_set_radius(&style_screen_1_ddlist_1_extra_list_main_default, 3);
//设置背景透明度
lv_style_set_bg_opa(&style_screen_1_ddlist_1_extra_list_main_default, 255);
//设置背景颜色
lv_style_set_bg_color(&style_screen_1_ddlist_1_extra_list_main_default, lv_color_hex(0xffffff));
//设置背景渐变色方向
lv_style_set_bg_grad_dir(&style_screen_1_ddlist_1_extra_list_main_default, LV_GRAD_DIR_NONE);
//将样式应用于下拉列表的主部分
lv_obj_add_style(lv_dropdown_get_list(ui->screen_1_ddlist_1), &style_screen_1_ddlist_1_extra_list_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

//Write style state: LV_STATE_DEFAULT for &style_screen_1_ddlist_1_extra_list_scrollbar_default
static lv_style_t style_screen_1_ddlist_1_extra_list_scrollbar_default;
ui_init_style(&style_screen_1_ddlist_1_extra_list_scrollbar_default);
//设置圆角半径

lv_style_set_radius(&style_screen_1_ddlist_1_extra_list_scrollbar_default, 3);
//设置背景透明度
lv_style_set_bg_opa(&style_screen_1_ddlist_1_extra_list_scrollbar_default, 255);
//设置背景颜色
lv_style_set_bg_color(&style_screen_1_ddlist_1_extra_list_scrollbar_default, lv_color_hex(0x00ff00));

//设置渐变色方向	lv_style_set_bg_grad_dir(&style_screen_1_ddlist_1_extra_list_scrollbar_default, LV_GRAD_DIR_NONE);

//将样式应用到滚动条
lv_obj_add_style(lv_dropdown_get_list(ui->screen_1_ddlist_1), &style_screen_1_ddlist_1_extra_list_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);

下一期讲解下拉框的回调以及信号。
本文章由威三学社出品
对课程感兴趣可以私信联系

http://www.dtcms.com/wzjs/837747.html

相关文章:

  • 公司网站建设服务公司陕西省建设网三类人员证书查询系统
  • 四川超宇建设集团网站江苏专业网站制作
  • 上杭县城乡规划建设局网站jsp是否可以做网站
  • 如何在百度开个网站深圳网站建设最专业的
  • 云南网站推广公司用分布式做的网站
  • 上海h5网站建设合肥网站建设公司哪家好
  • 湖北住房城乡建设厅网站各类网页设计
  • 网站开发实战演练手机网页图片显示不出来
  • 国家林业建设工程协会网站lamp网站开发架构经验
  • 做网站学的什么专业网站建设作业过程
  • 俄语网站模板玛丁图商城网站开发
  • 方城网站制作郑州外贸建站
  • 罗湖实惠的网站建设费用网站建设流程表
  • 淘宝客 网站选择WORDPRESS青岛网
  • 前几年做那个网站能致富便捷网站建设费用
  • 中文版的wordpressseo软件推广
  • 农村网站建设茂名360地图怎么添加商户
  • 建网站的程序免费如何做美食网站设计
  • 淄博网站设计丨致信网络推广方案应该有哪些方面
  • 网站开发技术 文库一个阿里云怎么做两个网站
  • 玉林网站建设公司专业做ppt的网站
  • 网站图片是用什么软件做的穆棱市住房和城乡建设局网站
  • 建购物网站难吗明快网站设计
  • 临沂网站域名.net 网站管理系统
  • 福永网站建设公司哪家好台州知名的网站建设
  • 新云网站模版dede做的网站打不开
  • 做网站的人叫什么软件做软件赚钱吗
  • 论坛源码有哪些吉安seo招聘
  • 学校网站要求上海公司注册网上申请
  • 凡科论坛网站制作石家庄货运做网站公司