![]() |
RadioButtons dynamisch erzeugen -kein OnResize mehr im Form?
Hi!
Ich erzeuge im OnCreate eines Forms eine Anzahl von RadioButtons dynamisch:
Delphi-Quellcode:
RadioButtons ist definiert als array of TRadioButton (wer hätte das gedacht :zwinker:)
SetLength(RadioButtons, Length(CryptingComponentsNames));
iMaxWidth := 0; for i := 0 to Length(CryptingComponentsNames)-1 do begin RadioButtons[i] := TRadioButton.Create(self); with RadioButtons[i] do begin Left := 8; Top := 8+i*24; Width := 153; Height := 17; AutoSize := True; Caption := CryptingComponentsNames[TCryptingComponents(i)]; Parent := self; end; iMaxWidth := Max(iMaxWidth, RadioButtons[i].Width); end; Self.ClientWidth := iMaxWidth+16; Self.ClientHeight := 41+Length(CryptingComponentsNames)*24; TCryptingComponents ist ein Typ, in welchem alle Verfahren aufgelistet werden. CryptingComponentsNames ist definiert als array[TCryptingComponents] of String; Num zum Problem: das Formular reagiert nicht mehr auf OnResize. Lasse ich die for-Schleife hingegen weg, funktioniert alles. Klicks auf Komponenten usw. funktionieren, also verfängt sich die Schleife nicht irgendwo. Kann mir irgendjemand weiterhelfen? Greetz alcaeus |
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:44 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz