ago in GUI Development by

I want to display a text with the value followed by the unit. The issue I'm facing is as follows,


var string a = "5459" ;
AttrText.String = "{parc}{fnt0}"+a+"{fnt1}µS/cm";



I wanted to get the unit in the center, so I tried a new way,


var string a = "5459" ;

AttrText.String = "{lay*,*}{colm}{parr}{fnt0}"+a+"{colm}{fnt1}µS/cm";



In this way I got the unit centered, but the text wraps at the layout endpoint.


I want to achieve an output like this but with only one text string. The user sets the value, the user can set any digit they prefer but the text should extend with center and middle oriented for the whole time.


We can't set a default size for the coloumn layout because the whole text should always be center-oriented no matter what value we feed.

 Any ideas how can we achieve this?

1 Answer

0 votes
ago by
Hello Thiru,

using {lay*,*} the available width for the text is divided in two equally large columns. The left columns seems in your case to be too small for the big digits. Divide the available space so that the left column is bigger. For example: {lay*,30%}.

I hope it helps you further.

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