2020-10-06 09:44 AM
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
Solved! Go to Solution.
2020-10-08 06:51 PM
Ok then upgrade to 4.15 (just came out yesterday).
A bug in the scroll wheel has been fixed in 4.14.
/Alexandre
2020-10-07 06:28 PM
Hello,
What version of TouchGFX are you using ?
/Alexandre
2020-10-07 11:44 PM
Hi, I'm using TouchGFX Designer Version: 4.13.0
Regards
2020-10-08 06:51 PM
Ok then upgrade to 4.15 (just came out yesterday).
A bug in the scroll wheel has been fixed in 4.14.
/Alexandre
2020-10-09 12:58 AM
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
2020-10-09 01:29 AM
Hi 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.
2020-10-12 05:19 PM
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 :
Also 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
2020-10-13 12:28 AM
Hi, 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
2020-10-13 02:18 AM
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
2020-10-13 03:49 AM
Thank you very much Alexandre.
Regards