简体   繁体   中英

How to avoid thousand separator in FILL-IN basic component

I have following piece of code in my Progress application:

DEFINE VARIABLE IntField AS INTEGER INITIAL 1000000 VIEW-AS FILL-IN.

This shows the following (mind the thousand separator):

在此处输入图像描述

Does anybody know how I can avoid showing the thousand separator?

Thanks in advance

Answer, given by Mike Fechner :

Just add a FORMAT phrase like this here:

DEFINE VARIABLE IntField AS INTEGER INITIAL 1000000 VIEW-AS FILL-IN FORMAT ">>>>>>>>9".

Edit

Although the mentioned answer is obviously correct, I also add here another line which means exactly the same:

DEFINE VARIABLE IntField  AS INTEGER FORMAT ">>>>>>>>9" INITIAL 1000000 VIEW-AS FILL-IN.

The difference is the location of the FORMAT... part: as you see in the first answer you might think that the FORMAT... part refers to the FILL-IN (the GUI component, also known as widget), but in fact it refers to the variable.

** Extra edit:**

One important remark: refrain from using ">>>...>" (only ">" characters) as an integer format specifier: in case the value is zero, an empty string is displayed in that case, while displaying "0" in such a case is more appropriate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM