DROPDOWN-下拉列表

自己生产的是不能直接用的哦 不能全面显示?怎么办?需要增加三句话。

参考:https://tieba.baidu.com/p/4983616378?red_tag=1583126393&traceid=

DROPDOWN-下拉列表_第1张图片


static void _cbDialog(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;
  int     NCode;
  int     Id;

  WM_HWIN hDropd0;
  WM_HWIN hDropd1;
  WM_HWIN hDropd2;


  switch (pMsg->MsgId) {
  case WM_INIT_DIALOG:

    hItem = pMsg->hWin;
    FRAMEWIN_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    FRAMEWIN_SetFont(hItem, GUI_FONT_24_ASCII);

    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
    TEXT_SetFont(hItem,  &GBK_16m16);
    TEXT_SetText(hItem, "开门次数:");


    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_1);
    TEXT_SetFont(hItem,  &GBK_16m16);
    TEXT_SetText(hItem, "刷卡次数:");

    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_2);
    TEXT_SetFont(hItem,  &GBK_16m16);
    TEXT_SetText(hItem, "刷卡周期:");

 
    hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
    BUTTON_SetText(hItem, "确认");
    BUTTON_SetFont(hItem,  &GBK_16m16);

    hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_1);
    BUTTON_SetText(hItem, "返回");
    BUTTON_SetFont(hItem,  &GBK_16m16);


    hDropd0  = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_0);
    hDropd1  = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_1);
    hDropd2  = WM_GetDialogItem(pMsg->hWin, ID_DROPDOWN_2);

    DROPDOWN_AddString(hDropd0, "0");
    DROPDOWN_AddString(hDropd0, "100");
    DROPDOWN_AddString(hDropd0, "1000");
    DROPDOWN_AddString(hDropd1, "1000");
    DROPDOWN_AddString(hDropd1, "10000");
    DROPDOWN_AddString(hDropd1, "20000");
    DROPDOWN_AddString(hDropd1, "30000");
    DROPDOWN_AddString(hDropd1, "40000");
    DROPDOWN_AddString(hDropd2, "10");
    DROPDOWN_SetAutoScroll(hDropd0,1);
    DROPDOWN_SetListHeight(hDropd0,50);
    DROPDOWN_SetScrollbarWidth(hDropd0,16);
    DROPDOWN_SetAutoScroll(hDropd1,1);
    DROPDOWN_SetListHeight(hDropd1,100);
    DROPDOWN_SetScrollbarWidth(hDropd1,16);
    DROPDOWN_SetAutoScroll(hDropd2,1);
    DROPDOWN_SetListHeight(hDropd2,0);
    DROPDOWN_SetScrollbarWidth(hDropd2,16);
    break;

你可能感兴趣的:(DROPDOWN-下拉列表)