새로운 ListBox 컴포넌트를 만들면 됩니다.
그러나 어렵지 않게 구현 할 수 있는데요...
하나의 함수만 추가하면 됩니다.
procedure CreateParams ...이 함수와
내용은 Style의 속성중 Scroll 과 관련된 속성을 제거하면 됩니다.
전체 소스는..
unit ListBoxTemp;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TListBoxTemp = class(TListBox)
public
procedure CreateParams (var Params: TCreateParams); override;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Hjun', [TListBoxTemp]);
end;
procedure TListBoxTemp.CreateParams (var Params: TCreateParams);
begin
inherited CreateParams (Params);
with Params do
Style := Style and not (WS_HSCROLL or WS_VSCROLL);
end;
end.
위와 같이 하면 됩니다.
그럼 즐거운 통신이 되시길...
|