Monday, May 21st 2018, 5:09pm UTC+2

You are not logged in.

  • Login
  • Register

murillo_bv

Beginner

Date of registration: Apr 19th 2017

Posts: 4

1

Wednesday, April 19th 2017, 12:24pm

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?

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 584

2

Monday, April 24th 2017, 10:47am

Hi,

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

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

Regards
Sven
SEGGER - Schoenen has attached the following file:

murillo_bv

Beginner

Date of registration: Apr 19th 2017

Posts: 4

3

Tuesday, April 25th 2017, 5:38am

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.

murillo_bv

Beginner

Date of registration: Apr 19th 2017

Posts: 4

4

Tuesday, May 9th 2017, 12:09am

Sorry to insist, but has anyone ever had this same problem?
Thank you

JAT-MAN

Beginner

Date of registration: Jan 11th 2018

Posts: 4

5

Thursday, January 11th 2018, 12:35pm

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!!!!

This post has been edited 1 times, last edit by "JAT-MAN" (Jan 11th 2018, 12:36pm)


SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 584

6

Friday, January 12th 2018, 2:25pm

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

JAT-MAN

Beginner

Date of registration: Jan 11th 2018

Posts: 4

7

Saturday, January 13th 2018, 8:56pm

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.

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 584

8

Thursday, January 18th 2018, 4:24pm

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/C++ Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
static void _OnMouseChange(USBH_HID_MOUSE_DATA  * pMouseData) {
  static GUI_PID_STATE State;
  int              	xSize;
  int              	ySize;

  xSize = LCD_GetXSize();
  ySize = LCD_GetYSize();
  State.Layer  = 0;
  State.x += pMouseData->xChange;
  if (State.x > xSize) {
	State.x = xSize;
  } else if (State.x < 0) {
	State.x = 0;
  }
  State.y += pMouseData->yChange;
  if (State.y > ySize) {
	State.y = ySize;
  } else if (State.y < 0) {
	State.y = 0;
  }
  State.Pressed  = pMouseData->ButtonState;
  GUI_MOUSE_StoreState(&State);
}


Attached is the application I have used for testing.

Regards
Sven
SEGGER - Schoenen has attached the following file:
  • TREEVIEW_Test.zip (1.1 kB - 46 times downloaded - Last download: Yesterday, 12:26pm)

JAT-MAN

Beginner

Date of registration: Jan 11th 2018

Posts: 4

9

Wednesday, January 24th 2018, 3:14pm

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