Hello,
FYIO:
Q. TSE: Error: Menu too large: What is the general idea of scrolling?
---
In general is the idea that you slide the smaller 'min-max block' always
in between the larger 'MIN-MAX block'.
But you never slide that 'min-max block' outside the boundaries of that
larger 'MIN-MAX block'.
---
Here moving the 'min-max block' from left to right within the MIN-MAX block
at 4 positions:
Note: Showing it here horizontal direction for simplification purposes,
but it can also be applied when the min-max block moves in the
vertical direction and that is what you do in TSE when scrolling
e.g. through a TSE Menu().
min max
[[xxxxxxx]..............................]
MIN MAX
min max
[...........[xxxxxxx]...................]
MIN MAX
min max
[......................[xxxxxxx]........]
MIN MAX
min max
[..............................[xxxxxxx]]
MIN MAX
How to move the 'min-max block'?
1. -Left (or Up)
Moving the 'min-max block' to the left by subtracting 1 from min
and also subtracting 1 from max and checking if min stays smaller or
equal to MIN. If not then fixing min equal to MIN.
Then each time displaying the 'min-max block' by printing its
elements from min to max.
2. -Right (or Down)
Moving the 'min-max block' to the right by adding 1 to min
and also adding 1 to max and checking if min stays smaller or
equal to MAX - (length of the 'min-max block').
If not then fixing min equal to MAX - (length of the 'min-max block')
or thus MAX - (max - min + 1).
Then each time displaying the 'min-max block' by printing its
elements from min to max.
===
In general you can move the min-max block
and or you can move the MIN-MAX block.
Applied to TSE, there you basically move the 'MIN-MAX block'
(instead of the 'min-max block' thus) and
keep that 'min-max block' (=the current TSE screen lines) in the same fixed position.
Moving the menu lines to the left while keeping the TSE screen lines
fixed.
min max
[[xxxxxxx]..............................]
MIN MAX
min max
[...........[xxxxxxx]...................]
MIN MAX
min max
[......................[xxxxxxx]........]
MIN MAX
min max
[..............................[xxxxxxx]]
MIN MAX
===
So this idea applied to TSE:
Here the 'min-max block' elements are the TSE window screen lines between min=1 and max = Query( ScreenRows ).
Here the 'MIN-MAX block' elements are the total lines of a TSE menu.
E.g.
min = 1 (=first vertical TSE screen line)
max = 60 (=last vertical TSE screen line (=screen lines available to show the TSE menu))
and
MIN = 1 (=first TSE menu line)
MAX = 100 (=last TSE menu line)
If MAX is greater than max (thus last TSE menu line is greater than last
TSE screen line) then the total menu lines can not be shown on the
current TSE screen, as 100 is greater than 60 and you will get the error
'Menu too large - needed: 100 rows - 91 columns'
where 91 is the current value of Query( ScreenCols ).
with friendly greetings
Knud van Eeden