MainWin
Re: MainWin
It's limited by the maximum height of the backing bitmap, which is 1440 pixels. If each row is 16 pixels high that would correspond to 90 rows for example. The only way to increase the number of rows would be by reducing the size of the font; with a 12-pixel-high font there could be 120 rows.
Re: MainWin
I didn't explain myself very well. Let's say that the MainWin will display a maximum of 90 rows at any one time, can more rows than this be displayed and scrolled, displaying 90 of the rows, without losing any of the rows. If not is there any way around it?guest wrote: ↑Sat Nov 01, 2025 8:22 pmIt's limited by the maximum height of the backing bitmap, which is 1440 pixels. If each row is 16 pixels high that would correspond to 90 rows for example. The only way to increase the number of rows would be by reducing the size of the font; with a 12-pixel-high font there could be 120 rows.
for n = 1 to 100
print n
next
When you scroll upwards it will only scroll to Row 12.
Re: MainWin
Obviously, what is displayed in the (say) 90 rows that can fit in the 1440-pixel-high bitmap is entirely under the control of your BASIC code.
So if you are prepared to go to the trouble of managing the scrolling yourself, those 90 rows could in principle be a 'window' on an arbitrarily large number of rows stored elsewhere, say in a string array.
You would then need to arrange that when the mainwin scrolls up, the bottom row is 'filled in' from the backing array rather than being blank as it normally would be. Similarly when it scrolls down the top row would need to be loaded from the array, rather than being cleared.
I don't suppose that would be terribly difficult, but it's hard to understand what the advantage would be compared with opening a TEXT window which has that functionality built in, rather than using the mainwin.
Re: MainWin
The reason for asking the question is a post on the LB Forum where a user had mistakenly posted LBB code in a MainWin. LB doesn't seem to have the same restriction. It will only show 88 rows but it can be scrolled to show more than that and the lines can be scrolled up and down without any loss of data. LBB doesn't work like that and will only show 88 lines and the first lines above this figure appear to be lost. Don't dwell on it though, because I wouldn't be using MainWin for something like this.
Re: MainWin
Indeed: LBB's mainwin is completely different from LB's mainwin. LBB's mainwin is in fact BBC BASIC's main output window; unlike most other aspects of LBB it does not attempt to emulate Liberty BASIC but rather retains the native capabilities of BBC BASIC. For example it is fully graphics capable, it can display colored text, and it can display text at arbitrary graphics coordinates!
The key differences which may affect a Liberty BASIC programmer are outlined in the Compatibility section of the LBB documentation, specifically in clause 7 where it says "The mainwin can hold only about 84 lines of text; if more lines are output the remainder will be 'scrolled off' the top of the window and lost. Also, the mainwin has no menu. You can copy the contents of the mainwin onto the clipboard by typing Ctrl+Tab".
If you want a Liberty BASIC style mainwin, use Liberty BASIC.