cancel
Showing results for 
Search instead for 
Did you mean: 

Wildcard text in simulator different than hardware

CPaye.1
Associate III

I am using TGX v4.16.1 with a STM469 Discovery board.

I have several text area with one wildcard widgets. The widgets are updated using native C++ strings. (BoxWithText is a custom container I created.)

void BoxWithText::SetText(std::string text)
{
    Unicode::strncpy(m_txtBuf, text.c_str(), static_cast<uint16_t>(text.length()));
    m_text.resizeToCurrentText();
 
    if (m_txtCenterVert)
    {
        CenterTextVertical();
    }
 
    if (m_txtCenterHor)
    {
        CenterTextHorizontal();
    }
 
    m_text.invalidate();
}

This works fine on the simulator. All of the widgets display the text correctly. However when I run on the target hardware, most of the text areas are blank. Some show a partial string or a string such as 0:00:00 (these are text areas for displaying time). The time should be non-zero.

To eliminate any issues with using a custom container, I tried using a native text area with one wildcard widget and I have the same issue: the text updates correctly in the simulator but not on the hardware. I also tried using native C-strings and had the same issue.

All of the text areas are in a scroll container. I added invalidating the scroll container itself but that did not change anything.

I feel like I am missing something basic when it comes to these types of widgets. Any help would be appreciated.

Thanks.

0 REPLIES 0