Delphi-PRAXiS
Seite 3 von 3     123   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Nicht nur Form vergrößern, sondern auch Elemente (https://www.delphipraxis.net/78740-nicht-nur-form-vergroessern-sondern-auch-elemente.html)

-=cats=- 11. Okt 2006 13:50

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:

kalmi01 11. Okt 2006 15:14

Re: Nicht nur Form vergrößern, sondern auch Elemente
 
Zitat:

Zitat von messie
Magst Du die Kompo mal mit ein paar Worten beschreiben?

Wenn Du die dynForm.txt liest, weist Du
Zitat:

Woher, wohin, wozu?
Sogar: Was und Wie stehen in den paar KB.

messie 12. Okt 2006 11:58

Re: Nicht nur Form vergrößern, sondern auch Elemente
 
Zitat:

Zitat von kalmi01
Zitat:

Zitat von messie
Magst Du die Kompo mal mit ein paar Worten beschreiben?

Wenn Du die dynForm.txt liest, weist Du
Zitat:

Woher, wohin, wozu?
Sogar: Was und Wie stehen in den paar KB.

Hmmm, da war wohl schon Mittagsschlaf. Ich habe die Kompo mal probiert: leider wird bei einigen Komponenten die Schriftgröße nicht angepaßt. Ich hab' es noch nicht ganz durchschaut aber es muß etwas mit alclient zu tun haben. Ich habe ein drei Panels, eins altop, eins albottom, ein alclient. Beim dem alclient und allen untergeordneten geht die Skalierung schief. Ohne diese Zuordnung läuft die Skalierung ganz schief.

Grüße, Messie

messie 12. Okt 2006 19:27

Re: Nicht nur Form vergrößern, sondern auch Elemente
 
Sooo, ich habe mal
Delphi-Quellcode:
if (FComponent = nil)
           or
           (FComponent.Align = alClient)
        then Exit;
durch
Delphi-Quellcode:
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;
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.
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 19:12 Uhr.
Seite 3 von 3     123   

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