TREEVIEW - not selecting

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • TREEVIEW - not selecting


    I am using a treeview but I am not able to select the rows.
    Actually I can only select once when I enter the screen, but when I try to change the selection to another line, it does not change.
    I can fill the treeview with all the rows and nodes I need, I got the scrool bar, I can open and close the nodes by clicking, but I can not select the rows more than once.
    I am able to make the selection through buttons and using the TREEVIEW_GetItem () function and its flags, but that is not the better way if I could do it just clicking.

    Can anybody help me?
  • emWin TreeView mouse click issue

    I am having the same issue. Everything works fine when doing with keyboard keys, can select files and open folders.

    With mouse I can open/close folders but as soon as i click a file it gets selected but after that I can't select any other file. I can still open and close folder though. Also after this it stops to respond from keyboard keys all together.


    The post was edited 1 time, last by JAT-MAN ().

  • Hi,

    which versions of emWin are you using?

    How do you pass touch to emWin?

    Make sure the up event (from the touch controller) gets passed to emWin with the coordinates as the last down event.
    Not sure if this solves the issue, but it is related to other issues in combination with pressing/clicking something.

  • Hi Sven,

    I am using emWin 5.22

    The below code from emUSB is used to pass the button state:

    Mouse_State.Pressed = HidEvent.Data.Mouse.ButtonState;


    Please note that everywhere in GUI all mouse clicks are working good, all widgets are working good, its just the issue with treeview click. If I click a folder +/- sign then that works, if I click the name of the folder then the folder also expands and retracts, its just when I click any file that it highlights the file name and after that I just can select any other file via mouse or keyboard.
  • Hi,

    Have tried to reproduce the issue but everything is working as intended.

    Here is the part how I pass the usb data forward to emWin:

    C Source Code

    1. static void _OnMouseChange(USBH_HID_MOUSE_DATA * pMouseData) {
    2. static GUI_PID_STATE State;
    3. int xSize;
    4. int ySize;
    5. xSize = LCD_GetXSize();
    6. ySize = LCD_GetYSize();
    7. State.Layer = 0;
    8. State.x += pMouseData->xChange;
    9. if (State.x > xSize) {
    10. State.x = xSize;
    11. } else if (State.x < 0) {
    12. State.x = 0;
    13. }
    14. State.y += pMouseData->yChange;
    15. if (State.y > ySize) {
    16. State.y = ySize;
    17. } else if (State.y < 0) {
    18. State.y = 0;
    19. }
    20. State.Pressed = pMouseData->ButtonState;
    21. GUI_MOUSE_StoreState(&State);
    22. }
    Display All

    Attached is the application I have used for testing.