issue on TextAreaWithOneWildcard , returns getTextWidth()=0 and stays blank
hello, i have an issue on update a vaiable textArea on a Modal Window (pop up..), the background images is ok but the text field stays empty after text buffer update & invalidate..
the "funny" thing is that the .getTextWidth() on the widget returns 0 after update so it looks like it does not render the string..
i'm wondering if i put the right typography attached correctly, where i've put all the needed "wildcard" ranges, 0-9,a-z, special characters and fallback.
i suppose i do not understand/maste exactly the variable text machinery on the background, really..
anway here some snippets on the gory details. provided that "TypedText()" are rendered ok..
init on object istantiation:
textCnt.setXY(10, 10);
textCnt.setColor(touchgfx::Color::getColorFrom24BitRGB(200, 0, 0));
textCnt.setLinespacing(0);
//touchgfx::Unicode::snprintf(textCntBuffer, TEXT_SIZE, "%s", touchgfx::TypedText(T_SINGLEUSEID11).getText());
textCnt.setWildcard(textCntBuffer);
textCnt.resizeToCurrentText();
add(textCnt);and then on the "update callback" fn, i just update:
touchgfx::Unicode::snprintf(textCntBuffer, TEXT_SIZE, "%d", value );
textCnt.invalidate();
textCnt.resizeToCurrentText();
int tSize = textCnt.getTextWidth(); // for check and debug..
textCnt.setPosition( (background.getWidth() - textCnt.getTextWidth())/2, (background.getHeight() - textCnt.getTextHeight())/2,
textCnt.getTextWidth(), textCnt.getTextHeight() );any hint or lead to futher debug/understand what's going on?
bye
Andrea
