Autor Beitrag
sTk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 70

Win 2000, Win XP
Turbo Delphi Pro, D2005 PE, Lazarus
BeitragVerfasst: Fr 10.11.06 11:28 
Hallo,

leider gibt es ja bei der Komponente TRadioGroup keine Eigenschaft AutoSize!

Bekomme ich es trotzdem irgendwie hin, dass sich die Radiogroup der Anzahl der Items anpasst.
Hintergrund ist, ich will beim Programmstart eine Auswahl haben, das können 2 Punkte aber auch 20 sein!
Wenn ich der Radiogroup nun eine feste Größe gebe, wo jett 20 Punkte reinpassen, dann sieht es meiner Meinung nach komisch aus, wenn da nur 2 drinstehn!

Danke schonmal für die Hilfe!

Gruß
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Fr 10.11.06 12:13 
aber es gibt die property height, die kannst du doch bei programmstart, sobald raus ist wieviele items du hast, anpassen.

ausblenden Delphi-Quelltext
1:
RadioGroup1.Height:=RadioGroup1.Items.Count*25;//für jedes item 25px platz					
sTk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 70

Win 2000, Win XP
Turbo Delphi Pro, D2005 PE, Lazarus
BeitragVerfasst: Fr 10.11.06 13:02 
Super!
Vielen Dank!

Schönes Wochenende schonmal!

Gruß