Einzelnen Beitrag anzeigen

Nils_13

Registriert seit: 15. Nov 2004
2.647 Beiträge
 
#16

Re: Alle Delphi-Farben (cl+) in ein Memo hinzufügen

  Alt 20. Mär 2006, 14:12
Jetzt schon zu spät, habe jetzt folgende Methode angwendet:
Delphi-Quellcode:
// hier habe ich die ganzen gleichen Farben großteils bzw. alle rausgelasen
const
  COLOR_NUM = 43;
  ColorConst: array [0..COLOR_NUM] of TColor = (clBlack,
    clMaroon, clGreen, clOlive, clNavy,
    clPurple, clTeal, clGray, clSilver, clRed,
    clLime, clYellow, clBlue, clFuchsia,
    clAqua, clWhite, clMoneyGreen, clSkyBlue,
    clCream, clMedGray, clActiveBorder,
    clActiveCaption, clAppWorkSpace, clBackground,
    clBtnFace, clBtnHighlight, clBtnShadow, clCaptionText,
    clGradientActiveCaption, clGradientInactiveCaption,
    clGrayText, clHighlight, clHighlightText, clHotLight,
    clInactiveBorder, clInactiveCaption, clInactiveCaptionText,
    clInfoBk, clMenuBar, clMenuHighlight, clScrollBar,
    cl3DDkShadow, cl3DLight, clWindow);
  ColorNames: array [0..COLOR_NUM] of string = ('Black',
    'Maroon', 'Green', 'Olive', 'Navy',
    'Purple', 'Teal', 'Gray', 'Silver', 'Red',
    'Lime', 'Yellow', 'Blue', 'Fuchsia',
    'Aqua', 'White', 'MoneyGreen', 'SkyBlue',
    'Cream', 'MedGray', 'ActiveBorder',
    'ActiveCaption', 'AppWorkSpace', 'Background',
    'BtnFace', 'BtnHighlight', 'BtnShadow', 'CaptionText',
    'GradientActiveCaption', 'GradientInactiveCaption',
    'GrayText', 'Highlight', 'HighlightText', 'HotLight',
    'InactiveBorder', 'InactiveCaption', 'InactiveCaptionText',
    'InfoBk', 'MenuBar', 'MenuHighlight', 'Scrollbar',
    '3DDkShadow', '3DLight', 'Window');

for i := Low(ColorNames) to High(ColorNames) do
   Console.Lines.Add(ColorNames[i]);
Läuft perfekt:
Zitat:
Black
Maroon
Green
Olive
Navy
Purple
Teal
Gray
Silver
Red
Lime
Yellow
Blue
Fuchsia
Aqua
White
MoneyGreen
SkyBlue
Cream
MedGray
ActiveBorder
ActiveCaption
AppWorkSpace
Background
BtnFace
BtnHighlight
BtnShadow
CaptionText
GradientActiveCaption
GradientInactiveCaption
GrayText
Highlight
HighlightText
HotLight
InactiveBorder
InactiveCaption
InactiveCaptionText
InfoBk
MenuBar
MenuHighlight
Scrollbar
3DDkShadow
3DLight
Window
  Mit Zitat antworten Zitat