I have a simple component
type
TTimedScrollBox = class(TScrollBox)
private
procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL;
protected
FSkipTime: Cardinal;
FEndTimeout: Cardinal;
FSkipScrollTimer: TTimer;
FEndScrollTimer: TTimer;
FLastMessage: TWMVScroll;
FWaiting: boolean;
FLastMessageValid: boolean;
FLog: TStrings;
FSkipCount: integer;
procedure SkipTimerEvent(Sender: TObject);
procedure EndTimerEvent(Sender: TObject);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property Log: TStrings read FLog;
published
property ScrollSkipTime: Cardinal read FSkipTime write FSkipTime default 100;
property ScrollEndTimeout: Cardinal read FEndTimeout write FEndTimeout default 200;
end;
I want to be able to specify values for ScrollSkipTime and ScrollEndTimeout at design time. I had the impression that all I need to do this is write the code as shown, but
- The default values I provided don't appear in the designer and
- When I set a breakpoint in the constructor and see what it's doing for an instance, the values of the fields behind the property are 0 even though the values I entered in the designer are stored in the DFM.
What am I missing/doing wrong?