Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Library: Object-Pascal / Delphi-Language (https://www.delphipraxis.net/35-library-object-pascal-delphi-language/)
-   -   Delphi Text einer CheckBox mehrzeilig darstellen... (https://www.delphipraxis.net/1074-text-einer-checkbox-mehrzeilig-darstellen.html)

Daniel B 14. Okt 2002 18:09


Text einer CheckBox mehrzeilig darstellen...
 
Delphi-Quellcode:
procedure MultiLineCheckBox(theControl: TWinControl);
var
   dwStyle: Longint;
begin
  dwStyle := GetWindowLong(theControl.handle, GWL_STYLE) or BS_MULTILINE;
  SetWindowLong(theControl.Handle, GWL_STYLE, dwStyle);
end;
Aufruf mit:

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
  MultiLineCheckBox(Checkbox1);
  CheckBox1.Caption := 'Hick' + #13#10 + 'Hack' + #13#10 + 'Huck';
end;
Grüsse, Daniel :hi:


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:34 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz