~~~~~~~~~~~~~~~~~~~~~~~~~
procedure SetMultiLineButton(AParent: TWinControl) ;
var j : integer;
ah : THandle;
begin
for j := 0 to AParent.ControlCount - 1 do
if (AParent.Controls[j] is TButton) then
begin
ah := (AParent.Controls[j] as TButton).Handle;
SetWindowLong(ah, GWL_STYLE,
GetWindowLong(ah, GWL_STYLE) OR
BS_MULTILINE) ;
end;
end;
{
usage: suppose there is a
Button1 and Button2 on Form1,
Button3 and Button4 on Panel1 on Form1
by calling the next line
SetMultiLineButton(Panel1)
only Button3 and Button4 will have
multi-lined caption.
}
~~~~~~~~~~~~~~~~~~~~~~~~~
Delphi tips navigator:
» Set File Date (created)
« Is Point in Polygon?

