Delphi .NET (2) Database (71) Delphi IDE (90) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280)
Exchange Links About this site Links to us 
New related comments Number of comments in the last 48 hoursAccess the current row/column of a TMemo 1 new comments
|
Change the Window Style for a control
This article has not been rated yet. After reading, feel free to leave comments and rate it.
The CreateParams method is used to set up the window style and all the other arguments
that are passed to CreateWindowEx to create the control's
To change the window style use something like this which creates a window with or
without a vertical scroll bar.
 | |  | |
procedure TMyControl.CreateParams(var Params: TCreateParams) ;
begin
inherited CreateParams (Params) ;
if IWantAScrollBar then
Params.Style := Params.Style or WS_VSCROLL
else
Params.Style := Params.Style and not WS_VSCROLL ;
end; | |  | |  |
Comments:
|