Delphi-PRAXiS
Seite 4 von 4   « Erste     234   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Die Delphi-IDE (https://www.delphipraxis.net/62-die-delphi-ide/)
-   -   Delphi 11 (Patch 1) zerstört Formulare (https://www.delphipraxis.net/209193-delphi-11-patch-1-zerstoert-formulare.html)

Uwe Raabe 9. Nov 2021 13:11

AW: Delphi 11 (Patch 1) zerstört Formulare
 
Zitat:

Zitat von Rollo62 (Beitrag 1497304)
Ooops, war gerade vor 5 Minuten in Jira angemeldet, Seite war noch offen.
Jetzt lese ich das hier, und versuche dahinzuspringen: Anmeldefehler.

Was ist denn da wieder los ?

Ja, war hier auch so. Abmelden und wieder anmelden ging aber dann. Das Ding ist einfach zu fragil.

sh17 9. Nov 2021 13:15

AW: Delphi 11 (Patch 1) zerstört Formulare
 
Bei mir kommt jetzt, ich hätte keine Berechtigung zur Reportanzeige meiner Issues. Die würfeln dort.

venice2 9. Nov 2021 13:18

AW: Delphi 11 (Patch 1) zerstört Formulare
 
Zitat:

Zitat von Michael II (Beitrag 1497303)
Zitat:

Zitat von venice2 (Beitrag 1497295)
Habe ich 100 Button auf der Form und setze diese alle Händisch bei jedem Resize, na dann viel Spaß dabei wenn man nicht selbst ein Anchor

Danke, den habe ich. Aber nicht so, wie du schreibst.

Na dann ;)

So mache ich es. (Nicht für VCL gedacht)
Für die die es Interessiert.

Delphi-Quellcode:
// Anchor ENUM-Callback-Funktion
function AnchorEnum(WinHandle: HWND; lp: lParam): HWND; stdcall;
var
  pr: TRect;
  rc: TRect;
  pP: integer;
  X, Y, xW, yH: integer;

begin

  if IsIconic(GetParent(WinHandle)) then
  begin
    // Stope Aufzaehlung
    Result := integer(False);
    Exit;
  end;

  pP := SkinEngine.AnchorItem(WinHandle);
  if pP > -1 then
    if gProp[pP].anchor > ANCHOR_NONE then
    begin
      GetClientRect(WinHandle, rc);
      GetClientRect(GetParent(WinHandle), pr);

      X := 0;
      Y := 0;
      xW := 0;
      yH := 0;

      case gProp[pP].anchor of

        ANCHOR_WIDTH: //= 1
          begin
            X := gProp[pP].rc.Left;
            Y := gProp[pP].rc.Top;
            xW := MAX(pr.Right - gProp[pP].rc.Left - gProp[pP].rc.Right, 0);
            yH := rc.Bottom;
          end;
        ANCHOR_RIGHT: //= 2
          begin
            X := pr.Right - rc.Right - gProp[pP].rc.Right;
            Y := gProp[pP].rc.Top;
            xW := rc.Right;
            yH := rc.Bottom;
          end;
        ANCHOR_CENTER_HORZ: //= 3
          begin
            X := (pr.Right div 2) + gProp[pP].centerx;
            Y := gProp[pP].rc.Top;
            xW := rc.Right;
            yH := rc.Bottom;
          end;
        ANCHOR_HEIGHT: //= 4
          begin
            X := gProp[pP].rc.Left;
            Y := gProp[pP].rc.Top;
            xW := rc.Right;
            yH := MAX(pr.Bottom - gProp[pP].rc.Top - gProp[pP].rc.Bottom, 0);
          end;
        ANCHOR_HEIGHT_WIDTH: //= 5
          begin
            X := gProp[pP].rc.Left;
            Y := gProp[pP].rc.Top;
            xW := MAX(pr.Right - gProp[pP].rc.Left - gProp[pP].rc.Right, 0);
            yH := MAX(pr.Bottom - gProp[pP].rc.Top - gProp[pP].rc.Bottom, 0);
          end;
        ANCHOR_HEIGHT_RIGHT: //= 6
          begin
            X := pr.Right - rc.Right - gProp[pP].rc.Right;
            Y := gProp[pP].rc.Top;
            xW := rc.Right;
            yH := MAX(pr.Bottom - gProp[pP].rc.Top - gProp[pP].rc.Bottom, 0);
          end;
        ANCHOR_BOTTOM: //= 7
          begin
            X := gProp[pP].rc.Left;
            Y := pr.Bottom - gProp[pP].rc.Bottom - rc.Bottom;
            xW := rc.Right;
            yH := rc.Bottom;
          end;
        ANCHOR_BOTTOM_WIDTH: //= 8
          begin
            X := gProp[pP].rc.Left;
            Y := pr.Bottom - gProp[pP].rc.Bottom - rc.Bottom;
            xW := MAX(pr.Right - gProp[pP].rc.Left - gProp[pP].rc.Right, 0);
            yH := rc.Bottom;
          end;
        ANCHOR_BOTTOM_RIGHT: //= 9
          begin
            X := pr.Right - rc.Right - gProp[pP].rc.Right;
            Y := pr.Bottom - gProp[pP].rc.Bottom - rc.Bottom;
            xW := rc.Right;
            yH := rc.Bottom;
          end;
        ANCHOR_CENTER_HORZ_BOTTOM: //= 10
          begin
            X := (pr.Right div 2) + gProp[pP].centerx;
            Y := pr.Bottom - gProp[pP].rc.Bottom - rc.Bottom;
            xW := rc.Right;
            yH := rc.Bottom;
          end;
        ANCHOR_CENTER_VERT: //= 11
          begin
            X := gProp[pP].rc.Left;
            Y := (pr.Bottom - rc.Bottom) div 2;
            xW := rc.Right;
            yH := rc.Bottom;
          end;
        ANCHOR_CENTER_VERT_RIGHT: //= 12
          begin
            X := pr.Right - rc.Right - gProp[pP].rc.Right;
            Y := (pr.Bottom - rc.Bottom) div 2;
            xW := rc.Right;
            yH := rc.Bottom;
          end;
        ANCHOR_CENTER: //= 13
          begin
            X := (pr.Right div 2) + gProp[pP].centerx;
            Y := (pr.Bottom div 2) + gProp[pP].centery;
            xW := rc.Right;
            yH := rc.Bottom;
          end;
      end;
      if lp <> 0 then
        DeferWindowPos(lp, WinHandle, 0, X, Y, xW, yH, SWP_NOZORDER or SWP_NOREDRAW)
      else
        MoveWindow(WinHandle, X, Y, xW, yH, False);
    end;

  Result := integer(True);

end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:54 Uhr.
Seite 4 von 4   « Erste     234   

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