diff --git a/delphi/KPANSI.PAS b/delphi/KPANSI.PAS index 528b0d1..ee051c6 100644 --- a/delphi/KPANSI.PAS +++ b/delphi/KPANSI.PAS @@ -318,6 +318,8 @@ var Line: PTermLine; begin inherited Create(AOwner); + Width := 660; + Height := 450; Color := clBlack; TabStop := True; FCols := 80; diff --git a/delphi/TESTMAIN.PAS b/delphi/TESTMAIN.PAS index fabcf84..b87b838 100644 --- a/delphi/TESTMAIN.PAS +++ b/delphi/TESTMAIN.PAS @@ -151,18 +151,6 @@ begin FAnsi.Top := 38; FAnsi.OnKeyData := AnsiKeyData; - { Size form to fit terminal + toolbar } - ClientWidth := FAnsi.Width; - ClientHeight := FAnsi.Top + FAnsi.Height; - - { Font diagnostic: write known CP437 box-drawing characters. } - { If the OEM font is working, you should see: } - { Line 1: single-line box top +---+ } - { Line 2: shade + full block ░▒▓█ } - { Line 3: single-line box bottom +---+ } - { If you see accented letters, the font is ANSI_CHARSET instead of } - { OEM_CHARSET. } - FAnsi.Write(#$DA#$C4#$C4#$C4#$BF' '#$B0#$B1#$B2#$DB' '#$C0#$C4#$C4#$C4#$D9#13#10); end; @@ -176,6 +164,12 @@ var HasData: Boolean; begin Show; + + { Size form to fit terminal + toolbar. Show triggers handle creation } + { and RecalcCellSize, so FAnsi.Width/Height reflect measured font. } + ClientWidth := FAnsi.Width; + ClientHeight := FAnsi.Top + FAnsi.Height; + FDone := False; while not FDone do begin