Forum Replies Created
-
AuthorPosts
-
June 4, 2022 at 1:09 pm in reply to: rzGroupBox 6.2.3: Caption doesn't scale with per-monitor DPI #3101
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?
June 4, 2022 at 1:06 pm in reply to: rzGroupBox 6.2.3: Caption doesn't scale with per-monitor DPI #3100(Trying a fourth time, because the last reply was accepted)
Well, sort of – other problems have occurred now:
- Yes, the RzGroupBox caption does scale correctly now.
- 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:
- 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:
- Moving the form back to the original screen makes the RzGroupBoxes complete lose their client areas:
- 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; - Of course it would be nicer if the client positioning were done correctly out of the box…
With best regards,
Andreas WeidnerJune 4, 2022 at 1:02 pm in reply to: rzGroupBox 6.2.3: Caption doesn't scale with per-monitor DPI #3099I have now tried twice to reply here, but each time my reply is lost after clicking ‘Submit’…
June 4, 2022 at 1:00 pm in reply to: rzGroupBox 6.2.3: Caption doesn't scale with per-monitor DPI #3098Well, sort of – other problems have occurred now:
- Yes, the RzGroupBox caption does scale correctly now.
- 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:
- 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:
- Moving the form back to the original screen makes the RzGroupBoxes complete lose their client areas:
- 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; - Of course it would be nicer if the client positioning were done correctly out of the box…
With best regards,
Andreas WeidnerMay 31, 2022 at 3:43 pm in reply to: rzGroupBox 6.2.3: Caption doesn't scale with per-monitor DPI #3092Sort 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 -
AuthorPosts