‎2019-11-25 09:30 AM
Is it possible to create a Text without ueing the Designer first? Seems like everything has to be done through the Text Manager.​
‎2019-11-28 11:24 PM
You can simply edit the Excel sheet - That's what the designer does. It reads from- and writes to that text excel sheet and you can use this approach if you're not using the designer, for instance.
/Martin
‎2019-11-29 04:19 AM
Hi Martin,
I tried to do it that way, defining a text ID and Typography, and <value> as text. Wildcard Characters and Ranges have all been set. Trying to put it on screen like this:
xDivText.setPosition(400, 240, 100, 50);
Unicode::snprintf(txtBuffer, 7, "1 %d", 4000);
xDivText.setTypedText(TypedText(T_GRAPHMINI));
xDivText.setColor(Color::getColorFrom24BitRGB(0xFF, 0xFF, 0xFF));
xDivText.setWildcard(txtBuffer);
swipeContainer1Page1.add(xDivText);
xDivText.resizeToCurrentText();
xDivText.invalidate();
results in nothing being displayed.
The aim is to get axis labels on screen, without having to provide every single text area beforehand.
‎2019-11-29 05:27 AM
Dumb question, but you're adding it to swipeContainer1Page1. Is that page visible? (E.g. is swipeContainer1Page1 visible?) :)
‎2019-11-29 05:32 AM
Yep, I've added other widgets to it, and they're displayed fine
‎2019-11-29 05:35 AM
When you're setting the position of the textarea to 400,240 it will be relative to the container it's in. So, it may be outside =) And you're already using .resizeToCurrentText(), so try
xDivText.setXY(20,20);
...
...
xDivText.resizeToCurrentText();
‎2019-11-29 05:38 AM
Or alternatively, don't call resizeToCurrentText();
Try debugging and inspecting the xDivText object. You can inspect its Rect and check width and height, etc.
‎2019-11-29 05:52 AM
Ok so getSolidRect() on the textArea yields x,y, width and height all 0 without using resize
‎2019-11-29 05:55 AM
Does T_GRAPHMINI specify a wildcard character?
‎2019-11-29 05:56 AM
You could also simply send me the project and i'll check.
/Martin