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




Users browsing this thread: 1 Guest(s)