Strange numeric column alignment issue

Use this Forum to post your “How to …” questions about your use of aXes. This is not a technical support forum. Both the aXes Support Team at LANSA and other aXes customers may answer your questions. LANSA cannot guarantee the accuracy of any information posted by customers.

Moderator: jeanmichel

Post Reply
Posts: 3
Joined: 25 May 2016, 23:03

Strange numeric column alignment issue

Post by MarcusLancaster » 02 Oct 2019, 01:42

Hi all.

I'm heading back into the world of aXes after a very, very long break... and have bumped into a strange problem. I'm interested in where to look to try to track the issue down.

So... I've got a simple subfile with a couple of alpha columns, and a single numeric column.

If I run aXes (4.1.1) in TS mode (which is currently the mode of the live application) and the screen is unpainted, the alpha columns align to the left, the numeric to the right. All good.

If I then paint the screen (maybe just add a label or something simple) and then re-run, the numeric column is centre aligned!

I should stress that the screen was identified and painted originally as a TS Developer.

Now interestingly... I noticed that there is an Application level style;

Name : Test
StyleFor : All
htmlTag :
style : font-family:Verdana;font-size:12pt;
theme :
for 5250Attributes : 0 items

If I delete that style... clear cache and re-run... the strange centre alignment on the numeric column doesn't happen.

So there's obviously some connection between that application level style and the centre align.

As a further test I re-introduced the style and played with various settings... and after a lot of tweaking and adjusting and cache clearing it appears that it is the font-family setting which is causing the issue (regardless of which font is specified).

So I'm at bit of a loss to explain this!

I just wonder if anybody has seen anything like this... I appreciate that this is TS and most people will be running TS2... this feels like a very newbie question, there must be a simple answer! Any pointers would be gratefully received :-)

Cheers for now!

tim mcentee
Posts: 17
Joined: 26 Jul 2017, 13:20

Re: Strange numeric column alignment issue

Post by tim mcentee » 02 Oct 2019, 12:46

Hi Marcus

When we started with aXes it used monospace fonts so everything in the 5250 world would line up correctly. Later versions made changes so that fields would line up with proportional fonts.

What doesn't line up though is where one text field is used to show a row of data for multiple fields

The solution is to:
1) revert to the old original theme - this will use a fixed font. This will give a quick test to see if your fields will line up with a monospace font.
2) Use a modern theme and follow the tutorial 3 - advanced and setting style to enter your monspaced font. eg. lucida console, courier new, Courier, monospace
3) More technical - use a modern material design theme and override the font. Create a udc.css with the css below and store it in ../ts/css
.terminalTheme .ui-widget, .md-axes .mdc-typography {
font-family: "lucida console", "courier new", Courier, monospace !important;


Posts: 3
Joined: 25 May 2016, 23:03

Re: Strange numeric column alignment issue

Post by MarcusLancaster » 05 Oct 2019, 00:12

Hi Tim.

Thanks for this... armed with this info, and digging around in the doco, I've got a little further and can see what's going on a little better. The data in the numeric column is left padded with spaces, and therefore with a monospaced font the effect is right alignment. With something like Verdana, the character widths aren't the same, and therefore the padding doesn't work and the effect is as if it has been centred... but on closer inspection, not quite centred... but there's no rogue "text-align:center" floating around... its the leading spaces plus the font that's giving me this effect...

I get the effect for either painted or unpainted screens when running via TS2... so a monospaced font is obviously the way to go... but the thing I'm still slightly confused about is that back in the early days of aXes (I'm thinking V2.2.0 or earlier and TS, not TS2) I'm sure I recall that this all worked okay, even with a proportional font like Verdana... I guess the TS engine may have rendered things in a slightly different way, or my memory is playing tricks!

Anyway - thanks once again - much appreciated.

Cheers for now.


User avatar
Posts: 105
Joined: 23 May 2014, 11:37
Location: Sydney

Re: Strange numeric column alignment issue

Post by jeanmichel » 07 Nov 2019, 09:33

Hi Marcus,

This post should help:


Jean-Michel Rapin

Address: 122 Arthur Street, North Sydney, NSW 2060, Australia
Tel: +61 289 070 262 | |

Post Reply