Incrementing The TouchGFX ScrollWheel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-27 8:22 AM
Hi all. I am looking for the correct method with which to implement a custom scroll wheel display. By default the display of numeric characters starts at '0' and increments by a single digit ad infinitum. For example and if possible, I would want to display the values 400 -> 1100 incrementing in steps of 100 however, I see no easy method within TouchGFX to be able to achieve this. I may be missing something, I usually do. If this is possible from within TGFX, can someone please advise how to manage this. If not, then please advise an alternative user code method or function to achieve it. Your help is much appreciated.
- Labels:
-
TouchGFX
-
TouchGFX Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-28 5:13 AM - edited ‎2024-11-28 5:15 AM
Hello @Al-E-Bags,
You can refer to Tutorial 4: Creating a Scroll Wheel with Custom Behavior | TouchGFX Documentation, it explains how to use a scroll wheel, but instead of :
virtual void scrollWheelUpdateItem(MenuElement& item, int16_t itemIndex)
{
item.setNumber(itemIndex);
}
Add an offset and limit the number of items in designer to the one desired :
virtual void scrollWheelUpdateItem(MenuElement& item, int16_t itemIndex)
{
item.setNumber(400+itemIndex*100);
}
Best regards,
ST Software Developer | TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-28 12:48 PM
Hi @LouisB and thanks for your suggestion. I'll be studying the tutorial over the next day or two. I will let you know how I progress.
