1.4k views
in GUI Development by
Hello, we have a requirement to show a value in a bigger font and to show the unit of measure in a smaller font inside the same text view. Is this possible with EmWi? I've toyed with the idea of doing 2 different text boxes but as you can imagine the value can change and the unit of measure needs to be shown right next to it which is not possible with the 2 different text boxes approach. It would be very helpful if you could recommend a solution. Thanks!

2 Answers

+1 vote
by
 
Best answer

Hi!

The best approach would be to use a Views::AttributedText to meet your requirement. Just use an individual AttributedSet object where you define two different fonts: A big font for the value and a small font for the unit and let the AttributedText show the entire string (i.e. value + unit). Hope this helps...

Best regards,
Manuel

+1 vote
by

Hi,

You can also arrange one text view to appear aligned on another text view. See the chapter Arrange other views on the content of the Text view. In this manner, when the content of one Text view changes, other views can be moved or resized.

 

Best regards

Paul Banach

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...