Author Topic: Show value in DP always flush right  (Read 6407 times)

FST

  • Guest
Show value in DP always flush right
« on: March 16, 2011, 10:29:35 AM »

My problem is, that if the value in the display are changing the position also will change.
With %5d the value will move on both side.
With %d the value will move to the rigth.

I saw in the DP200 with the EIC that there are value which are moving to the left.
How can I implement, that my value is fixed on the right an if I rise the value it will move the the left.

Thank you for your help.
Frank

Offline Niska

  • PLUS+1 User
  • **
  • Posts: 6
  • Karma: +0/-0
    • SRS
Re: Show value in DP always flush right
« Reply #1 on: March 16, 2011, 11:22:22 AM »
You need to have Monotype fonts (same width on all letters and numbers) on the value you want to show and use %5d.

In DP200 program Sauer-Danfoss is using Aero-font for the text and fixed Aero font (monotype) on the values.

Offline Marbek_Elektronik

  • PLUS+1 Guru
  • *****
  • Posts: 350
  • Karma: +8/-0
    • Marbek Elektronik
Re: Show value in DP always flush right
« Reply #2 on: May 11, 2013, 11:40:21 AM »
But I have used Aero Font and it is not Fixed size !?

Bernd
Marbek Elektronik, Dipl.-Ing. Bernd Konrad
Dienstleistung, Entwicklung, Herstellung

Offline Neil

  • PLUS+1 Expert
  • ****
  • Posts: 96
  • Karma: +2/-0
Re: Show value in DP always flush right
« Reply #3 on: May 12, 2013, 09:31:09 PM »
Hi there.

If you use %05d the units not in use will be filled with zeros such as 0017.
This will at least stop the fonts jumping around.

regards Neil.

Offline jashom1

  • PLUS+1 Expert
  • ****
  • Posts: 78
  • Karma: +6/-0
Re: Show value in DP always flush right
« Reply #4 on: May 17, 2013, 02:27:54 AM »
Try using %-5d, That should left justify the number.

John.

Offline Marbek_Elektronik

  • PLUS+1 Guru
  • *****
  • Posts: 350
  • Karma: +8/-0
    • Marbek Elektronik
Re: Show value in DP always flush right
« Reply #5 on: May 17, 2013, 06:25:49 PM »
Hi,

which fonts are you using (fixed size)?

It would be nice, to be able to right justify letters.


By,
Bernd
Marbek Elektronik, Dipl.-Ing. Bernd Konrad
Dienstleistung, Entwicklung, Herstellung