AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Nicht nur Form vergrößern, sondern auch Elemente

Ein Thema von -=cats=- · begonnen am 10. Okt 2006 · letzter Beitrag vom 12. Okt 2006
Antwort Antwort
messie

Registriert seit: 2. Mär 2005
Ort: Göttingen
1.592 Beiträge
 
Delphi 2009 Professional
 
#1

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

  Alt 12. Okt 2006, 19:27
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
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:22 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