Monday, January 22nd 2018, 11:09am UTC+1

You are not logged in.

  • Login
  • Register

tosh

Beginner

Date of registration: May 13th 2016

Posts: 13

1

Thursday, December 21st 2017, 2:09am

Notification from SWIPELIST

Hello,

I'm trying to catch WM_NOTIFICATION_RELEASED and WM_NOTIFICATION_SEL_CHANGED
from SWIPELIST widget, but failing. I can get WM_NOTIFICAITON_CLICKED message
when I press a item in the SWIPELIST.

I can see that bgcolor changed blue to black when I move or release my finger on the screen,
so it looks de-select the item is working, but I'm not able to receive WM_NOTIFICATION_RELEASED
/WM_NOTIFICATION_SEL_CHANGED on the parent window.

Is there any clue to enable those two notifications on the SWIPELIST?

I'm using STemWin 5.40.

Regards,

Tosh

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 468

2

Wednesday, January 3rd 2018, 3:28pm

Hi,

Attached is a short example on how to react on the swipelist notifications.

The WM_NOTIFICATION_SEL_CHANGED doesn't realy makes sense so I left it out. If you want to react on it simply add another case to the callback function.
WM_NOTIFICATION_SEL_CHANGED gets only send if the pointer input (or touch) leaves the selected item.

Regards
Sven
SEGGER - Schoenen has attached the following file:

tosh

Beginner

Date of registration: May 13th 2016

Posts: 13

3

Thursday, January 4th 2018, 2:02am

Hi,

Thanks for your replay. My code is quite similar to your suggested example.
Anyway, I ported your code into my target,
but still I can't get WM_NOTIFICATION_RELEASED. ?(

Tosh

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 468

4

Thursday, January 4th 2018, 1:38pm

Hi,

Do you get the release event with other widgets like a button?

If not, how to you pass touch events to emWin?

Make sure you pass the up event from the touch controller with the same coordinates as the last pressed event to emWin.

Regards
Sven

tosh

Beginner

Date of registration: May 13th 2016

Posts: 13

5

Friday, January 5th 2018, 5:16am

Hi,

Yes, BUTTON works fine without any problem.

But, I was clearing coordinates when touch release is detected.
Keeping previous position with release events as you suggested,
now SWIPELIST also able to detect release event. 8o

Great thanks!!

Tosh