其实我自己也找到了,通过spy++查找控件的属性得来的。
最终代码如下:
TADListBox = class(TListBox)
protected
procedure CreateParams(var Params: TCreateParams); override;
end;
procedure TADListBox.CreateParams(var Params: TCreateParams);
begin
inherited;
with Params do
begin
Style := Style or LBS_DISABLENOSCROLL or WS_VSCROLL;
Style := Style and not WS_HSCROLL;
end;
end;