简体   繁体   中英

TAlphacolor in Integer to convert to Alphacolor description

I obtained a value of -65536 from the RTTI inspector for Red .

  1. How do I convert it into a constant description of Red without duplicating all the members of the TAlphaColorRec record into an array?

  2. How do I set ColorCombobox1.Color := ... somefunction(-65536) that TColorCombobox knows it is Red ?

From Delphi source:

TAlphaColorRec = record
const
  Alpha = TAlphaColor($FF000000);
  Aliceblue = Alpha or TAlphaColor($F0F8FF);
  Antiquewhite = Alpha or TAlphaColor($FAEBD7);
  Aqua = Alpha or TAlphaColor($00FFFF);

I read How to set a custom TAlphaColor programmatically? but it does not have what I need.

我认为您在问题#1 中寻找的是System.UIConsts单元中的AlphaColorToString()

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