【发布时间】:2015-08-28 06:04:13
【问题描述】:
如何将 rgb 颜色设置为任何组件? FireMonkey,C++ 生成器 XE8。 我用过这段代码,但是没用...
Rectangle1->Fill->Color = RGB(255, 50, 103);
Rectangle1->Fill->Color = (TColor)RGB(255, 50, 103);
可能我必须使用 RGBA 吗?但我不知道该怎么做。
我做到了。
UnicodeString s ;
s = "0xFF" ;
s += IntToHex ( 255 , 2 );
s += IntToHex ( 50 , 2 );
s += IntToHex ( 103 , 2 );
Rectangle1 -> Fill -> Color = StringToColor ( s );
【问题讨论】:
-
没用因为 ...?
-
什么也没发生,颜色设置为零...
标签: c++ rgb c++builder firemonkey