F fangwy Unregistered / Unconfirmed GUEST, unregistred user! 2006-06-21 #2 procedure TForm1.Button1Click(Sender: TObject); var i: Integer; begin i := GetWindowLong(Button1.Handle, GWL_STYLE); SetWindowLong(Button1.Handle, GWL_STYLE, i or BS_MULTILINE); Button1.Caption := 'Line1' + #13#10 + 'Line2'; end;
procedure TForm1.Button1Click(Sender: TObject); var i: Integer; begin i := GetWindowLong(Button1.Handle, GWL_STYLE); SetWindowLong(Button1.Handle, GWL_STYLE, i or BS_MULTILINE); Button1.Caption := 'Line1' + #13#10 + 'Line2'; end;