Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Slight problem with calculation of number of lines of text that can be displayed
#1
I'm so close to having everything working - just a few tiny odds and ends to figure out....

Let's say I open a Windows a screen with QB64 that is 400 x 400 pixels and I start displaying text on the screen with a font size of 12. My calculations say that I should be able to fit 33 lines of text on this screen (33 x 12 pixels = 396 pixels). However, in actuality, I can only fit 32 lines.

Is there something like an invisible "buffer" of a few pixels that cannot be used?

When I use a screen capture utility to capture a copy of my window, I can see that the area inside of the physical screen borders is precisely 400 pixels so I can't quite make sense of what I'm running into.
Reply
#2
Bottom row or two are the auto-scroll lines. Only way to print to them without scrolling is to use LOCATE and then end your PRINT line$ with a semicolon.

LOCATE LastLine, 1
PRINT LineToPrint$;
Reply
#3
Fantastic! That makes sense.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Splitting REALLY *REALLY* long lines into single character + CR + LF Circlotron 10 1,532 04-22-2025, 11:30 AM
Last Post: Circlotron
  [split] Lines of Code bplus 20 3,046 01-25-2025, 05:11 PM
Last Post: Pete
  Big problem for me. MystikShadows 11 1,979 01-16-2025, 05:11 AM
Last Post: JRace
  Problem with "MOD" Kernelpanic 5 1,020 01-06-2025, 02:37 AM
Last Post: Pete
  Problem with _Resize dano 7 1,245 10-22-2024, 07:22 PM
Last Post: dano

Forum Jump:


Users browsing this thread: