2 Replies Latest reply on Jun 19, 2017 11:38 AM by Imen D

    stemwin icon bitmap change

    sha.him

      I had created a image icon menu and want to change bitmap when some one make a click on any icon.

      Which function should i use for this, below is the code for reference.

      void vGeneralFunction_StartTest(void){
      WM_HWIN       hWin;
      MenuFlag = StartTest;
      LCD_Clear(LCD_COLOR_WHITE);
      hProg = PROGBAR_CreateEx(0, 480, 725+4, 19, WM_HBKWIN, WM_CF_SHOW, PROGBAR_CF_HORIZONTAL, 0);
      PROGBAR_SetMinMax(hProg, Min, Max);
      PROGBAR_SetBarColor(hProg, 0, GUI_YELLOW);
      PROGBAR_SetText(hProg, " ");
      /*
      * Create iconview widget
      */
      hWin = ICONVIEW_CreateEx(LCD_X_SIZE-350+10, LCD_Y_SIZE-85, 1000, 400, 
      WM_HBKWIN, WM_CF_SHOW | GUI_WRAPMODE_NONE, 
      ICONVIEW_SF_AUTOSCROLLBAR_V, GUI_ID_ICONVIEW0, 80, 80);
      /*
      * Add icons to the widget
      */
      for (lp=0; lp<GUI_COUNTOF(_aBitmapItemStartMenu); lp++) {
      ICONVIEW_AddBitmapItem(hWin, _aBitmapItemStartMenu[lp].pBitmap, _aBitmapItemStartMenu[lp].pText);
       }
      ICONVIEW_SetBkColor(hWin, ICONVIEW_CI_SEL, GUI_LIGHTGRAY);
      ICONVIEW_SetFont(hWin, &GUI_Font20_ASCII);
      ICONVIEW_SetTextColor(hWin, ICONVIEW_CI_SEL, GUI_GRAY);
      ICONVIEW_SetTextColor(hWin, ICONVIEW_CI_UNSEL, GUI_GRAY);
      WM_HasFocus(hWin);
      GUI_Exec();
      while (1){
      if (ts_event.key_status == touch_key_down){
      }
      GUI_Delay(5);
      }
      }