![]() |
Re: Nicht nur Form vergrößern, sondern auch Elemente
Vielen Dank für Eure Hilfe !!
Für`s erste läuft alles :) :dp: Gruß, -=cats=- :coder: |
Re: Nicht nur Form vergrößern, sondern auch Elemente
Zitat:
Zitat:
|
Re: Nicht nur Form vergrößern, sondern auch Elemente
Zitat:
Grüße, Messie |
Re: Nicht nur Form vergrößern, sondern auch Elemente
Sooo, ich habe mal
Delphi-Quellcode:
durch
if (FComponent = nil)
or (FComponent.Align = alClient) then Exit;
Delphi-Quellcode:
ersetzt. Jetzt wird die Schriftgröße so angepaßt wie bei den anderen Controls. Wenn alclient zu sehr großen Änderungen des Controls führt, wird das natürlich nicht optimal. Aber das soll die Kompo ja eigentlich durch die Skalierung verhindern.
if FComponent = nil then exit;
if FComponent.Align = alClient then begin if FHasFontProp then begin NewFontSize := InitFontSize; FCompFont.Size := NewFontSize; SetCompFont(Component, FCompFont); end; if (Round(OwnerHeight) = InitOwnerHeight) and (Round(OwnerWidth) = InitOwnerWidth) then begin if FHasFontProp then begin NewFontSize := InitFontSize; FCompFont.Size := NewFontSize; SetCompFont(Component, FCompFont); end; end else begin if FHasFontProp then begin NewFontSize := Round(InitFontSize * HeightRatio - 0.5); if NewFontSize > FSglMaxFontSize then NewFontSize := FSglMaxFontSize; if NewFontSize < FSglMinFontSize then NewFontSize := FSglMinFontSize; FCompFont.Size := NewFontSize; SetCompFont(Component,FCompFont); end; end; FComponent.Align := alClient; FComponent.Repaint; Application.ProcessMessages; Exit; end; Es bleibt noch ein Problem: ich habe zwei Elemente, die albottom sind, ein Panel und einen Statusbar. Nach ResizeAll wird der Statusbar über das Panel gesetzt. Dies passiert nur, wenn das Form ein untergeordnetes ist! In einem Testprojekt lief das glatt solange ich im MainForm war... Trotzdem meiner Meinung nach ein sehr gutes Projekt was die Weiterentwicklung auch berechtigt Grüße, Messie |
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:25 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