TREEVIEW - not selecting

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

  • TREEVIEW - not selecting

    Hello,

    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?
  • Hi,

    I tried to reproduce the behavior but it works as expected.

    Attached is my text code. Please give it a try.

    Regards
    Sven
    Files
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • I have tried your code.
    Still doesn't work for me.
    The strange thing is that I am able to open and close the nodes by clicking, but when I try to select some of the rows, is just selected in the first try. When I try to select another row it's not working.
  • 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.

    PLEASE HELP!!!!

    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.

    Regards
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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;

    GUI_MOUSE_StoreState(&Mouse_State);



    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.

    Regards
    Sven
    Files
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • treeview click issue

    Got the issue fixed at last.

    The issue was that TimeMS++; was not being called in the tick, so just added that to the tick interrupt and all started working good.

    Thank you Schoenen for all the help