LIST消失的那一刻应该要调用OnDrawItem重画数据,在这里试试看

解决方案 »

  1.   

    见下面例子:unit KKComboBox;interfaceuses
      Messages, Classes, Controls, StdCtrls;type
      TKKComboBox = class(TComboBox)
      private
        FOnCloseUp: TNotifyEvent;
        procedure CNCommand(var Message: TWMCommand); message CN_COMMAND;
        { Private declarations }
      protected
        { Protected declarations }
      public
        { Public declarations }
      published
        { Published declarations }
        property OnCloseUp: TNotifyEvent read FOnCloseUp write FOnCloseUp;
      end;procedure Register;implementationprocedure TKKComboBox.CNCommand(var Message: TWMCommand);
    begin
      inherited;
      
      if Message.NotifyCode = CBN_CLOSEUP then
      begin
        if Assigned(FOnCloseUp) then FOnCloseUp(Self);
      end;
    end;procedure Register;
    begin
      RegisterComponents('Samples', [TKKComboBox]);
    end;end.
      

  2.   

    kentking:
    感谢关心我的问题。我想等我试了先
      

  3.   

    多谢KENTKING我按你的办法已解决这个问题。