cancel
Showing results for 
Search instead for 
Did you mean: 

Scroll Wheel items: Misalignment between what is seeing and where the code item is.

Fran Marala
Associate III

Hi all;

I have developed an application where there is a simple SrollWhell with a custom container, in which there is a icon and a number which content depend of the value of the current item selected, so that is my problem:

I see that the current item selected is changing sequentially following the scroll whell but the icon and number goes a step back from this.

Code:

This part is right: void ScreenSetSubsystemView::scrollWheellistSubsystemUpdateItem(MenuElement& item, int16_t itemIndex) {

        currentItemSelected = scrollWheellistSubsystem.getSelectedItem(); 

where currentItemSelected is working fine

This part is what I wanted to fix:

void MenuElement::setIcon(int SubsystemType, int SegmentNumb) {

      switch(SubsystemType)

    {

        case 0:

            icon.setBitmap(Bitmap(BITMAP_GRIFO_140_150_ID));

            Unicode::snprintf(textnumSegmentBuffer, TEXTNUMSEGMENT_SIZE, "%02d", SegmentNumb);  

            touchgfx_printf("SetIcon case 0 SubsystemType : %d, SegmentNumb : %d\n", SubsystemType, SegmentNumb);          

            textnumSegment.invalidate();

            

            break;

        case 1:

            icon.setBitmap(Bitmap(BITMAP_PISCINA_BASE_140_150_ID));

            Unicode::snprintf(textnumSegmentBuffer, TEXTNUMSEGMENT_SIZE, "%02d", SegmentNumb);

            touchgfx_printf("SetIcon case 1 SubsystemType : %d, SegmentNumb : %d\n", SubsystemType, SegmentNumb);

            textnumSegment.invalidate();

            break;

case 2: .......

What happen is that, when the code is in case 1 , I can see that toucgfx show me correctly this case, but the icon.setBitmap is in the case 0 and so on with the rest o cases.

I was trying to fixe it using differente values for selected item offset and item margin but I won't find the way.

Thanks a lot for the help

Regards

Francisco García

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Ok then upgrade to 4.15 (just came out yesterday).

A bug in the scroll wheel has been fixed in 4.14.

/Alexandre

View solution in original post

9 REPLIES 9
Alexandre RENOUX
Principal

Hello,

What version of TouchGFX are you using ?

/Alexandre

Fran Marala
Associate III

Hi, I'm using TouchGFX Designer Version: 4.13.0

Regards

Alexandre RENOUX
Principal

Ok then upgrade to 4.15 (just came out yesterday).

A bug in the scroll wheel has been fixed in 4.14.

/Alexandre

Fran Marala
Associate III

Hi, I have just to upgrade to 4.14 but the problem still appear. I can't found the version 4.15, could you tell me how to do it please.

Thanks

Fran Marala
Associate III

0693W000004JDQIQA4.pngHi again, I have just tested the example provided in UI template provided for ST (using 4.14 version), when you click the radio button Scroll Whell, there you can see the problem, there is a difference between the selected value and the value show into the scroll whell.

Alexandre RENOUX
Principal

Your simulator is not showing something correct indeed. What did you do exactly ?

Because I did the same thing (with any version actually, you should never have this) and we tested it dozens of times. This is what I get :

0693W000004JWujQAG.pngAlso to download TouchGFX 4.15, simply go to this page https://www.st.com/en/development-tools/touchgfxdesigner.html and click on the "Get Software" button.

/Alexandre

0693W000004JXuQQAW.pngHi, about my simulator you are right is strange because now is working properly.

About to get 4.15 version of TouchGFX, is not possible only is eligible up to 4.14

Regards

I told you to click the "Get Software" button and what you are doing is click "Select version" menu. Just click the pink button.

Also if you look just above the Select version menu, it is written "Previous versions" which means it's PREVIOUS versions therefore not the current one ;)

/Alexandre

Thank you very much Alexandre.

Regards