硬汉嵌入式论坛

 找回密码
 立即注册
查看: 317|回复: 3
收起左侧

[ThreadX全家桶] 一个界面有多个drop list,如何区分是哪个操作了

[复制链接]

40

主题

113

回帖

233

积分

高级会员

积分
233
发表于 2023-9-12 19:27:56 | 显示全部楼层 |阅读模式
一个界面有多个drop list,如何区分是哪个操作了?
回复

使用道具 举报

40

主题

113

回帖

233

积分

高级会员

积分
233
 楼主| 发表于 2023-9-12 20:28:34 | 显示全部楼层
    GX_VERTICAL_LIST *list;
//    INT               selected_index;
    DROP_LIST_ITEM   *selected_item;
    GX_STRING         text;
   
    /* Get popup list of the drop list. */
    gx_drop_list_popup_get(&screen_comm_modbus_set.screen_comm_modbus_set_drop_list_baudrate, &list);
   
    /* Get the selected index of the popup list. */
    gx_vertical_list_selected_index_get(list, &selected_index);
   
        /* Get popup list of the drop list. */
    gx_drop_list_popup_get(&screen_comm_modbus_set.screen_comm_modbus_set_drop_list_stopbits, &list);
   
    /* Get the selected index of the popup list. */
    gx_vertical_list_selected_index_get(list, &selected_index1);
比较笨的方法是读取索引,哪个变了就是操作哪个了,回头在研究一下。
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106913
QQ
发表于 2023-9-13 08:59:09 | 显示全部楼层
yihang1004 发表于 2023-9-12 20:28
GX_VERTICAL_LIST *list;
//    INT               selected_index;
    DROP_LIST_ITEM   *selected ...

触发不同都会回调消息即可。
回复

使用道具 举报

40

主题

113

回帖

233

积分

高级会员

积分
233
 楼主| 发表于 2023-9-13 09:09:27 | 显示全部楼层
eric2013 发表于 2023-9-13 08:59
触发不同都会回调消息即可。

硬汉哥,添加触发回调,drop list小组件就不显示了,在研究一下吧。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-5-9 19:50 , Processed in 0.189397 second(s), 26 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表