Hi All,
I believe I am seeing this with other Widgets as well, but currently I'm just trying to get a simple SLIDER widget working, with an OK and Cancel button on the same window...
I'm using an STM32H7 with a 5.0" Touch LCD screen ONLY, there is NO keyboard or anything else involved.
The OK/Cancel will work fine as long as you don't touch on the SLIDER, once you do, the slider is forever focussed, and no matter where I touch on the entire LCD screen, the SLIDER remains focussed...
This is simple code generated from the GUI builder, just a slider and button...
Display All
NOTE: I also see the same behavior if I just build and run the "DIALOG_SliderColor.c" sample that comes with the STemWin release...
So how do I UN-FOCUS the widget so I can touch another widget (without having an actual keyboard)????
I believe I am seeing this with other Widgets as well, but currently I'm just trying to get a simple SLIDER widget working, with an OK and Cancel button on the same window...
I'm using an STM32H7 with a 5.0" Touch LCD screen ONLY, there is NO keyboard or anything else involved.
The OK/Cancel will work fine as long as you don't touch on the SLIDER, once you do, the slider is forever focussed, and no matter where I touch on the entire LCD screen, the SLIDER remains focussed...
This is simple code generated from the GUI builder, just a slider and button...
C Source Code
- /*********************************************************************
- * *
- * SEGGER Microcontroller GmbH & Co. KG *
- * Solutions for real time microcontroller applications *
- * *
- **********************************************************************
- * *
- * C-file generated by: *
- * *
- * GUI_Builder for emWin version 5.32 *
- * Compiled Oct 8 2015, 11:59:02 *
- * (c) 2015 Segger Microcontroller GmbH & Co. KG *
- * *
- **********************************************************************
- * *
- * Internet: www.segger.com Support: support@segger.com *
- * *
- **********************************************************************
- */
- // USER START (Optionally insert additional includes)
- // USER END
- #include "DIALOG.h"
- /*********************************************************************
- *
- * Defines
- *
- **********************************************************************
- */
- #define ID_WINDOW_0 (GUI_ID_USER + 0x00)
- #define ID_SLIDER_0 (GUI_ID_USER + 0x01)
- #define ID_BUTTON_OK (GUI_ID_USER + 0x02)
- // USER START (Optionally insert additional defines)
- // USER END
- /*********************************************************************
- *
- * Static data
- *
- **********************************************************************
- */
- // USER START (Optionally insert additional static data)
- // USER END
- /*********************************************************************
- *
- * _aDialogCreate
- */
- static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
- { WINDOW_CreateIndirect, "Window", ID_WINDOW_0, 0, 0, 800, 480, 0, 0x0, 0 },
- { SLIDER_CreateIndirect, "Slider", ID_SLIDER_0, 189, 160, 391, 89, 0, 0x0, 0 },
- { BUTTON_CreateIndirect, "Button", ID_BUTTON_OK, 13, 366, 130, 50, 0, 0x0, 0 },
- // USER START (Optionally insert additional widgets)
- // USER END
- };
- /*********************************************************************
- *
- * Static code
- *
- **********************************************************************
- */
- // USER START (Optionally insert additional static code)
- // USER END
- /*********************************************************************
- *
- * _cbDialog
- */
- static void _cbDialog(WM_MESSAGE * pMsg) {
- int NCode;
- int Id;
- // USER START (Optionally insert additional variables)
- // USER END
- switch (pMsg->MsgId) {
- case WM_NOTIFY_PARENT:
- Id = WM_GetId(pMsg->hWinSrc);
- NCode = pMsg->Data.v;
- switch(Id)
- {
- case ID_BUTTON_OK: // Notifications sent by 'Button'
- switch(NCode)
- {
- case WM_NOTIFICATION_CLICKED:
- break;
- }
- break;
- case ID_SLIDER_0: // Notifications sent by 'Slider'
- switch(NCode)
- {
- case WM_NOTIFICATION_CLICKED:
- // USER START (Optionally insert code for reacting on notification message)
- // USER END
- break;
- case WM_NOTIFICATION_RELEASED:
- // USER START (Optionally insert code for reacting on notification message)
- // USER END
- break;
- case WM_NOTIFICATION_VALUE_CHANGED:
- // USER START (Optionally insert code for reacting on notification message)
- // USER END
- break;
- // USER START (Optionally insert additional code for further notification handling)
- // USER END
- }
- break;
- // USER START (Optionally insert additional code for further Ids)
- // USER END
- }
- break;
- // USER START (Optionally insert additional message handling)
- // USER END
- default:
- WM_DefaultProc(pMsg);
- break;
- }
- }
- /*********************************************************************
- *
- * Public code
- *
- **********************************************************************
- */
- /*********************************************************************
- *
- * CreateWindow
- */
- WM_HWIN CreateWindow(void);
- WM_HWIN CreateWindow(void) {
- WM_HWIN hWin;
- hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
- while(1) {
- GUI_Exec();
- }
- }
- // USER START (Optionally insert additional public code)
- // USER END
- /*************************** End of file ****************************/
NOTE: I also see the same behavior if I just build and run the "DIALOG_SliderColor.c" sample that comes with the STemWin release...
So how do I UN-FOCUS the widget so I can touch another widget (without having an actual keyboard)????