Hi all, Thanks for trying to help me out. Actually i was able to solve the problem.
I created the flex buttons like this.
touchgfx::IconButtonStyle< touchgfx::WildcardTextButtonStyle< touchgfx::ImageButtonStyle< touchgfx::ClickButtonTrigger > > > button[MAX_BTN_COUNT];
Unicode::UnicodeChar txtBuffer[MAX_TXT_BUFF_SIZE];
Then i created a text template from touchgfx UI and added to the text.
button[button_id].setWildcardTextPosition(20, 20, button_width - 40, button_height - 40);
button[button_id].setWildcardText(TypedText(T_BUTTON2X2TEXTRESOURCE));
button[button_id].setWildcardTextBuffer(txtBuffer);
Aditionnaly i had to comment these lines on WildcardTextButtonStyle.hpp
void setWildcardText(TypedText t)
{
wildcardText.setTypedText(t);
// wildcardText.setWidth(T::getWidth());
// wildcardText.setHeight(T::getHeight());
wildcardText.setWideTextAction(WIDE_TEXT_WORDWRAP);
}