2019-03-13 09:21 PM
To implement something like iconview in emwin,I created a Custom container,consist of a image and textarea. name as a icon.Then,create 2 screen .The screen1 use SwipeContainer ,whitch add 12 icon.
Q1:How do I determine which icon is pressed?
Q2:How do I switch to screen2 by clicking the icon?
Solved! Go to Solution.
2019-03-18 01:38 AM
Are you looking to make it touchable? You can add a simple ClickListener to any widget. Or, you can override handleClickEvent() in your View and simply check of the touch-coordinates are within the boundaries of a widget.
Check out the "Transition" example through the designer to see how to change between screens.
Hope that helps!
/Martin
2019-03-18 01:38 AM
Are you looking to make it touchable? You can add a simple ClickListener to any widget. Or, you can override handleClickEvent() in your View and simply check of the touch-coordinates are within the boundaries of a widget.
Check out the "Transition" example through the designer to see how to change between screens.
Hope that helps!
/Martin
2019-03-20 08:00 PM
thank you!
Q1: Yes,I know how to add a simple ClickListener to a widget in screen.But now,the widget is in a Custom container.Customcontainer is in SwipeContainer .SwipeContainer is in a screen.So,I dont know how to do this.
check of the touch-coordinates ,this is a bad complexity way.
Q2:In "Transition",the botton can be choose to clicked source.But in my application,the clicked source is a image that in Customcontainer that in SwipeContainer.But it can not be choose.
:grinning_face_with_sweat:
2019-03-21 02:50 AM
Q1: Search this subforum for examples of this - I created a working example of clicklisteners from custom containers for someone else, now that you mention it.
Q2: I just talked to the designer team and in the future, all click listeners will also be selectable as source for an interaction.
2019-03-22 08:33 AM
Q1:success�?�?�?Thank you very much�?:kissing_face_with_closed_eyes: :kissing_face_with_closed_eyes: :kissing_face_with_closed_eyes:
Q2:How do I now manually switch screen in the container's callback function in 4.10.0?
Q3:If I create screenA in 1.Tougfx and screenB in 2.Tougfx.
How to copy screenA and screenB from 1. Tougfx and 2. Tougfx and paste them directly into 3. Tougfx.
Instead of completely redesigning it manually。