1.8k 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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...