Delphi XE(在Delphi 2010中运行良好)。
尝试:在其中创建一个框架和一个颜色框。颜色框 -> 设置除黑色以外的选定颜色和样式 = cbCustomColor (not cbCustomColors); 将框架粘贴到表单中,保存项目。
关闭项目。重新打开->错误如下:
我需要这个“自定义颜色”,谁在抓狂:我,一个彩盒,一个框架还是整个 Delphi?:) 谢谢!!!
源代码:
object Form1: TForm1
Left = 0
Top = 0
Caption = 'Form1'
ClientHeight = 202
ClientWidth = 447
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
inline Frame21: TFrame2
Left = 72
Top = -38
Width = 320
Height = 240
TabOrder = 0
ExplicitLeft = 72
ExplicitTop = -38
end
end
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Unit2;
type
TForm1 = class(TForm)
Frame21: TFrame2;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
end.
object Frame2: TFrame2
Left = 0
Top = 0
Width = 320
Height = 240
TabOrder = 0
object ColorBox1: TColorBox
Left = 72
Top = 48
Width = 145
Height = 22
Selected = clGreen
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbCustomColor]
TabOrder = 0
end
end
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TFrame2 = class(TFrame)
ColorBox1: TColorBox;
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
{$R *.dfm}
end.