2011-08-07 16 views
1

Delphi XE(它在Delphi 2010中正常工作)。Delphi:frame + colorbox = bug

嘗試:創建一個框架和一個顏色框在裏面。顏色框 - >設置一個黑色以外的選定顏色和樣式= cbCustomColor(不是cbCustomColors);將框架粘貼到表單中,保存一個項目。

關閉該項目。 Reopen->錯誤如下:

enter image description here enter image description here

我需要這個「自定義顏色」,誰是嚇壞:我,一個顏色框,框或整個德爾福? :) 謝謝!

的源代碼:

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. 

回答

2

這是德爾福XE的錯誤。請將此添加到QC bug reporting system at Embarcadero

+0

如果有人想報告 - 請報告。我不想要,我很懶(我不是一個專業的程序員,所以這不是我的優先事項):) – maxfax

+0

我不是一個專業的程序員,但我確實報告。它可以幫助你和其他人。沒有報告的錯誤有更多的機會解決。 –

+0

@ Rudy Velthuis,對!請報告! – maxfax