说的不准确,是MyTreeView从来没在工程中出现,所以我应该没有机会去隐藏它,一个单元内在它之前和之后的控件都有显示,就它不出来,在palette属性里能看到它,里dpk或其它设计控件的PAS里能在palette上看来它,一进工程或者普通PAS就看不到了。

解决方案 »

  1.   

    不光是treeview 我定义listview也不成功,不能成功显示在palette,在属性里查,却是存在
      

  2.   

    unit MyBoxes;
    interface
    uses
      SysUtils, Classes, Controls, StdCtrls,QComCtrls;
    type
      TMyCheckBox = class(TCheckBox)
      private
        { Private declarations }
      protected
        { Protected declarations }
      public
        { Public declarations }
      published
        { Published declarations }
      end;
    type
      TMyTreeView = class(TTreeView)
      private
        { Private declarations }
      protected
        { Protected declarations }
      public
        { Public declarations }
      published
        { Published declarations }
      end;
    type
      TMyListView = class(TListView)
      private
        { Private declarations }
      protected
        { Protected declarations }
      public
        { Public declarations }
      published
        { Published declarations }
      end;
    type
      TMyComboBox = class(TComboBox)
      private
        { Private declarations }
      protected
        { Protected declarations }
      public
        { Public declarations }
      published
        { Published declarations }
      end;
    procedure Register;
    implementationprocedure Register;
    begin
      RegisterComponents('Favor', [TMyCheckBox,TMyTreeView,TMyListView,TMyComboBox]);
    end;
    end.
    准确说,我什么都没写,MycheckBox和MyCombox有显示,TreeView和ListView
      

  3.   

    怎么会有QComCtrls?不要用这个,这个是CLX的。用VCL的ComCtrls。问题应该就是出在这里
      

  4.   

    我还有注意这一点,但还是搞错了,搞得我用delphi自动生成一个,郁闷了很久.谢谢.