QB64 Phoenix Edition
Slight problem with calculation of number of lines of text that can be displayed - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2)
+--- Thread: Slight problem with calculation of number of lines of text that can be displayed (/showthread.php?tid=358)



Slight problem with calculation of number of lines of text that can be displayed - hanness - 05-06-2022

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.


RE: Slight problem with calculation of number of lines of text that can be displayed - SMcNeill - 05-06-2022

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$;


RE: Slight problem with calculation of number of lines of text that can be displayed - hanness - 05-06-2022

Fantastic! That makes sense.