Mega Code Archive

 
Categories / Delphi / Examples
 

Set button multi line caption

Title: Set button multi-line caption You may use SetWindowLong function with BS_MULTILINE parameter to set multi line caption of some button. procedure TForm1.Button1Click(Sender: TObject); var TempButton: LongInt; begin TempButton:=GetWindowLong(Button1.Handle, GWL_STYLE); SetWindowLong(Button1.Handle, GWL_STYLE, TempButton or BS_MULTILINE); end;