cancel
Showing results for 
Search instead for 
Did you mean: 

Inquire about how to set the scroll wheel step change.

mSH.1
Associate III

hello

The scroll wheel is set and used as follows.

0693W00000QKNLVQA5.png

void ScrTopSetView::scrollWheel_ScrTopSet_minuteUpdateCenterItem(CustomContainer_temp_wheel& item, int16_t itemIndex)
{
    // Override and implement this function in ScrTopSet
 
	int data;
 
	minute = itemIndex;
 
	  Unicode::snprintf(textArea_ScrTopSet_nMinuteBuffer, TEXTAREA_SCRTOPSET_NMINUTE_SIZE, "%02d", (minute ));
 
	 textArea_ScrTopSet_nMinute.invalidate();
 
}

One step at a time is good.

I need a configuration that changes by 1 step or 10 steps depending on the setting value, but I am not sure how to set the 10 step change.

I'd like to know how to set the level at which the scroll wheel changes.

thank.​

4 REPLIES 4
Osman SOYKURT
ST Employee

Hello mSH.1,

I'm not sure about what you mean by "1 step or 10 steps depending on the setting value"

Do you want to set the speed of your scroll ? If yes, that's possible in TouchGFX Designer with Swipe Acc. and Drag Acc. :

0693W00000QKNUcQAP.png 

We have a very good documentation which explains the scroll wheel in detail, and also some example with code. I invite you to have a look at it. If you still have question, don't hesitate to write in this post again.

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX

hello, @Osman SOYKURT​ 

-> It is implemented by referring to the basic example.

The scroll wheel value changes in one step.

0693W00000QKNbiQAH.jpg

-> What I need is to change the value of the scroll wheel by 10 steps.

0693W00000QKNdKQAX.png

Show 10 steps on the scroll wheel and void ScrTopSetView::scrollWheel_ScrTopSet_minuteUpdateCenterItem(CustomContainer_temp_wheel& item, int16_t itemIndex)

In the function, the value of itemindex changes in 10 steps.

I'm trying to set it up while looking at the API, but I'm not sure yet

tnank.​

Hello mSH.1,

Ok, then I think you can use scrollWhellUpdateItem() function. You can then update your item like that :

item.updateText(itemIndex*10);

We have an example of scroll wheel usage on TouchGFX Designer, I invite your to have a look at it.

Another solution would be to update your scroll wheel in it entire with function like :

scrollWheel.setNumberOfItems(ITEM_NUMBER)

if you want to filter your items, then use modulo (%) to show what you want, for instance if you want 0, 10, 20, 30, then a %10 is good.

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX
mSH.1
Associate III

hello, @Oskt (ST Employee)​ 

Thanks for the helpful answer for me.