cancel
Showing results for 
Search instead for 
Did you mean: 

Set Text without designer

JReed.1856
Associate II

Is it possible to create a Text without ueing the Designer first? Seems like everything has to be done through the Text Manager.​

17 REPLIES 17
JReed.1856
Associate II

Sorry, I don't think I can send you the entire project. T_GRAPHMINI is one of the enums in TextKeysandLanguage.hpp, he corresponding Translation in the excel sheet is GraphMini with Typography Mini

Martin KJELDSEN
Chief III

getSolidRect() is not what you think, i think. It returns the largest possible rectangle that is guaranteed to be solid.

Please use:

    /**
     * @fn const Rect& Drawable::getRect() const
     *
     * @brief Gets the rectangle this Drawable covers.
     *
     *        Gets the rectangle this Drawable covers, in coordinates relative to its parent.
     *
     * @return The rectangle this Drawable covers expressed in coordinates relative to its
     *         parent.
     */
    const Rect& getRect() const
    {
        return rect;
    }

for some reason I can't call this on xDivText, xDivText.getRect() in the debugger doesn't work, while xDivText.getTypedText() for example works

Just inspect xFivText after calling resizeToCurrentText() and find the rect member.

/Martin

This doesn't return a rect property.

{<touchgfx::TextAreaWithWildcardBase> = {<touchgfx::TextArea> = {<touchgfx::Widget> = {<touchgfx::Drawable> = {<No data fields>}, <No data fields>}

there is no drawable to the text area?

Rect rect

is a member of Drawable of which TextArea (With or without wildcard) is a type. I think there's something wrong with your debugger setup.

It's very essential to TouchGFX to be able to determine the rect of a Drawable in order to optimize rendering.

/Martin

You could try using GDB on the simulator project if you're having trouble with your target debugger.

/Martin

I am using the CubeIDE, but haven't really edited anything in the debugger settings. When using texts set by the designer, I can't access the rect property either.