Skip to main content
Karim
Associate III
March 6, 2022
Solved

Change scrollwheel content by a button in TouchGFX.

Hi,

Is it possible to change the content of a scrollwheel by a button in the same screen.

For example I have 3 options Menu 1, Menu 2 and Menu 3 in scrollwheel when the screen appears for the firs time. I want to change these options to Menu 4 ~ Menu 6 by clicking a button in same screen.

Is there any other solution?

Thank you everyone.

This topic has been closed for replies.
MM..1
MM..1Best answer
Super User
March 7, 2022
Ok then before invalidate add
scrollWheel1.itemChanged(1);
scrollWheel1.itemChanged(2);
scrollWheel1.itemChanged(3);

8 replies

MM..1
Super User
March 6, 2022

you can do , what you need write into

scrollWheelUpdateItem(MenuElement& item, int16_t itemIndex)

Karim
KarimAuthor
Associate III
March 6, 2022

thank you for your reply.

Yes I your are right and I already use it. I defined scrollWheelUpdateItem in screenview.cpp and it updates the content when change the screen from other screen to this screen.

But I want change the content by clicking a Button in current screen. (By defining an interaction for example)

MM..1
Super User
March 6, 2022

Into button action place

markervariable=4;
scrollwhell.invalidate

and in

scrollWheelUpdateItem(MenuElement& item, int16_t itemIndex)
{
if (markervariable == 4)
 {
 
 }
else {
actual code or any other change what show
 
}
}