Andreas Weidner

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • Andreas Weidner
    Participant

      This is my fourth try: Every time I reply with any text longer than a paragraph, or even containing images, the reply vanishes. To which e-mail address can I send my repkly without losing it?

      Andreas Weidner
      Participant

        (Trying a fourth time, because the last reply was accepted)

        Well, sort of – other problems have occurred now:

        1. Yes, the RzGroupBox caption does scale correctly now.
        2. But now its client area is scaled incorrectly, messing up the layout. To show this, I put an ugly red client-aligned panel inside, here with four differently styled group boxes:
        3. Moving this form to a 4K screen with 300% scaling makes the captions of the RzGroupBoxes unreadable, because the client-aligned panels overlap them. Embarcadero’s group boxes have correct client positioning, but screw up font size for bold captions:
        4. Moving the form back to the original screen makes the RzGroupBoxes complete lose their client areas:
        5. The messed-up client positioning in RzGroupBox can be easily corrected with the following (seemingly stupid) source code:
          procedure TForm1.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI,
          NewDPI: Integer);
          begin
          RedPanel.Top:=ReadPanel.Top xor 1
          end;
        6. Of course it would be nicer if the client positioning were done correctly out of the box…

        With best regards,
        Andreas Weidner

        Andreas Weidner
        Participant

          I have now tried twice to reply here, but each time my reply is lost after clicking ‘Submit’…

          Andreas Weidner
          Participant

            Well, sort of – other problems have occurred now:

            1. Yes, the RzGroupBox caption does scale correctly now.
            2. But now its client area is scaled incorrectly, messing up the layout. To show this, I put an ugly red client-aligned panel inside, here with four differently styled group boxes:
            3. Moving this form to a 4K screen with 300% scaling makes the captions of the RzGroupBoxes unreadable, because the client-aligned panels overlap them. Embarcadero’s group boxes have correct client positioning, but screw up font size for bold captions:
            4. Moving the form back to the original screen makes the RzGroupBoxes complete lose their client areas:
            5. The messed-up client positioning in RzGroupBox can be easily corrected with the following (seemingly stupid) source code:
              procedure TForm1.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI,
              NewDPI: Integer);
              begin
              RedPanel.Top:=ReadPanel.Top xor 1
              end;
            6. Of course it would be nicer if the client positioning were done correctly out of the box…

            With best regards,
            Andreas Weidner

            Andreas Weidner
            Participant

              Sort of fixed, but not well:
              1. The caption font size now DOES correctly scale.
              2. Unfortunately, the client area of the rzGroupBox does NOT correctly scale, meaning
              that after a rescale, it either overlaps the caption (scaling>1.0), making it
              unreadable, or leaves empty space below the caption (scaling <1.0). This is
              noticable if you, e.g., put an ugly red client-aligned panel inside the rzGroupBox
              and move the form between monitors with different DPIs.
              3. In the case of the above client-aligned panel, the remedy is to change its TOP
              value. This sounds of course rather stupid and SHOULD not do anything, but it DOES
              work and correct the position of the client contents:
              PROCEDURE Form.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI,NewDPI: Integer);
              BEGIN
              Panel1.Top:=Panel1.Top XOR 1
              END;
              4. Embarcadero’s TGroupBox can now also have a bold caption, and the client area is
              always correctly scaled. Unfortunately, ONLY the client area is correctly scaled,
              but the bold caption is NOT.

              With best regards,
              Andreas Weidner

            Viewing 5 posts - 1 through 5 (of 5 total)