Re: Number display format - trailing spaces

2017-05-11 Thread Malcolm Stone via 4D_Tech
>How about String(number;"|yourPreferredFormat") and set it right justified?

>Not sure, but try non breakable space instead of char32. 

Thanks for the suggestions. Alas, the problem remains. Interesting result in 
testing:
ARRAY REAL(aNum;0)
ARRAY TEXT(aText;0)
C_LONGINT($i)
//create two arrays for display in a list box
SELECTION TO ARRAY([Table_1]amount;aNum)
For ($i;1;Size of array(aNum))
APPEND TO ARRAY(aText;String(aNum{$i};"###,##0.00 ;(###,##0.00);0.00 "))
  //If (aNum{$i}>0)
  //aText{$i}:=aText{$i}+"."
  //end if
End for 

Looking at the aText column (horizontal alignment = right):
Without that commented section, it’s the same old problem - no space after 
positive numbers.
Uncomment, run again, the period is preceded by a space when displayed in a 
list box. A positive number is displayed “123.45 ."

Conclusion: the space is there but the listbox (or form, or QR) won’t render it!

I fear that even if the string conversion worked, footer (and other) 
calculation would be more complicated.


Malcolm
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Number display format - trailing spaces

2017-05-11 Thread Arnaud de Montard via 4D_Tech

> Le 11 mai 2017 à 18:58, Malcolm Stone via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> Resurrecting a question for which I haven't seen an answer:
> 
> If I choose the built-in format "###,##0.00  ;###,##0.00CR"

Not sure, but try non breakable space instead of char32. 

-- 
Arnaud de Montard 




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Number display format - trailing spaces

2017-05-11 Thread Alan Chan via 4D_Tech
How about String(number;"|yourPreferredFormat") and set it right justified?

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>Resurrecting a question for which I haven't seen an answer:
>
>If I choose the built-in format "###,##0.00  ;###,##0.00CR"
>Forms, list boxes and quick reports look like:
>123.45|
>123.45CR|
>(difficult to model with proportional font - trying to show positive and 
>negative both all the way to the right)
>
>I want:
>123.45| << spaces after positive number
>123.45CR|
>
>That is, decimals aligned. Why is the blank space in the positive section of 
>the format definition ignored?
>
>I've gone way over the allowed (time spent tinkering) / (perceived benefit) 
>ratio on this!
>Have tried "#,##0.00"+Char(32)+Char(32)+";#,##0.00CR" with OBJECT SET FORMAT, 
>also Char(202)
>
>I verify that this worked correctly in a previous life (4D 6.7, Windows).
>Currently 4D 15.4, Mac OS 10.12.4
>
>Thanks,
>Malcolm
>
>

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Number display format - trailing spaces

2017-05-11 Thread Malcolm Stone via 4D_Tech
Resurrecting a question for which I haven't seen an answer:

If I choose the built-in format "###,##0.00  ;###,##0.00CR"
Forms, list boxes and quick reports look like:
123.45|
123.45CR|
(difficult to model with proportional font - trying to show positive and 
negative both all the way to the right)

I want:
123.45| << spaces after positive number
123.45CR|

That is, decimals aligned. Why is the blank space in the positive section of 
the format definition ignored?

I've gone way over the allowed (time spent tinkering) / (perceived benefit) 
ratio on this!
Have tried "#,##0.00"+Char(32)+Char(32)+";#,##0.00CR" with OBJECT SET FORMAT, 
also Char(202)

I verify that this worked correctly in a previous life (4D 6.7, Windows).
Currently 4D 15.4, Mac OS 10.12.4

Thanks,
Malcolm


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**