用新颜色(或新世界中的颜色)格式化! [英] Formatting with colours (or colors in the New World!)

查看:38
本文介绍了用新颜色(或新世界中的颜色)格式化!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道为什么以下不会改变正数和负数的颜色?

Does anyone have any idea why the following doesn''t change colours for positive and negative numbers?

展开 | 选择 | 换行 | 行号

推荐答案

对于那些希望的人,这里是填充列表框的整个函数。我不认为这是问题的真正需要,但因为我会离开,这里是......享受!

For those who wish, here is the whole function which fills the listbox. I don''t think it''s really required for the problem, but since I''ll be away, here it is... Enjoy!

展开 | 选择 | Wrap | 行号


首先,我不确定变量是否可以保存彩色数据。

如果可以,格式字符串需要颜色标记BEFORE它影响的文字。我不认为+是一个有效的格式char(但可能只是作为文字)。另外,我很确定#只能在句点之前使用。
Firstly, I''m not sure that a variable can hold coloured data.
If it could, the format string wants the colour tag BEFORE the text it effects. I don''t think the "+" is a valid format char (but may work simply as a literal). Also, I''m fairly sure the "#" can only be used before the period.



首先,我不确定变量是否可以保存彩色数据。

如果可以,格式字符串需要颜色标记在它生效的文本之前。我不认为+是一个有效的格式char(但可能只是作为文字)。另外,我很确定#只能在期间之前使用。
Firstly, I''m not sure that a variable can hold coloured data.
If it could, the format string wants the colour tag BEFORE the text it effects. I don''t think the "+" is a valid format char (but may work simply as a literal). Also, I''m fairly sure the "#" can only be used before the period.



是+和 - 是文字,有助于显示一个值是高于还是低于标准。 #在小数点后工作但是如果在小数点后没有非零数字,它会使DP离开那里1.00。格式为+ 1。我可以忍受。


我会在其余的格式位之前尝试使用颜色标签,看看它是怎么回事。


感谢您的帮助


Jim

Yes the "+" and "-" are literals and help to show if a value is above or below the norm. The "#" does work after the decimal point but if there are no non-zero digits after the decimal point, it leaves the DP there so that "1.00" formats as "+1." I can live with that.

I''ll try the colour tag before the rest of the format bits and see how that goes.

Thanks for the help

Jim


这篇关于用新颜色(或新世界中的颜色)格式化!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆