type
TComboButton = class(TCustomPanel)
private
{ Private declarations }
FButton : TdxButton;
FComboBox : TComboBox;
FClick, FSelect : TNotifyEvent;
FDropWidth : Integer;
protected
{ Protected declarations }
Procedure doClick(Sender:TObject);
Procedure doDropDown(Sender:TObject);
Procedure doSelect(Sender:TObject);
public
{ Public declarations }
Constructor Create(AOwner:TComponent); override;
Destructor Destroy; override;
published
{ Published declarations }
property Button : TdxButton read FButton;
Property ComboBox : TComboBox read FComboBox;
Property OnClick : TNotifyEvent read FClick write FClick;
Property OnSelect : TNotifyEvent read FSelect write FSelect;
Property DropWidth : Integer read FDropWidth write FDropWidth;
end;
위에서요 property에 Caption을만들려고 하는데 컴파일하면 caption명이 사라지더군요 어떻게 해야하나요?
FCaption: String;
procedure setCaption(const Value: String);
published
property Caption: string read FCaption write setCaption;
implementation
procedure TComboButton.setCaption(const Value: String);
begin
FCaption := Value;
Invalidate;
end;
이렇게 하시면 될것이라 생각합니다.
(직접 확인해보진 않았어요. ^^;)