TSE: Linux: How to resolve this 'menu too large' error?

7 views
Skip to first unread message

knud van eeden

unread,
Nov 1, 2025, 3:09:35 PM (4 days ago) Nov 1
to SemWare TSE Pro Text Editor, S.E. Mitchell
TSE: Linux: How to resolve this 'menu too large' error?

Hello,

When trying to get my TSE for Microsoft Windows programs run also in TSE for Linux WSL
seeing this 'menu too large' error popping up.

First I tried to first maximize the screen in TSE for Linux, but still that error (sometimes, for those MENUs with more menu options than fit on the screen, not all).

Now many of my MENUs have very many menu entries.

So that is the root cause of this error 'menu too large'.

As a workaround already for many years using Carlo Hogeveen's workaround of systematically
first maximizing the screen then decreasing the font size to a smaller size (e.g. from 12 to 10 to 9 to 8 to 7 to 6) 
until small enough to possibly fit all those menu option lines on the screen.

Something like this:

---
 I = menuFontSizeMaxI + 1
 REPEAT
  I = I - 1
  fontSetB = SetFont( fontNameS, I, fontFlagI )
  fontSizeMinimumReachedB = ( I <= menuFontSizeMinI )
  stopB = ( fontSizeMinimumReachedB ) OR ( userChoseMenuOptionB ) OR ( userChoseEscapeB )
 UNTIL ( stopB )
---


But of course in Linux WSL there TSE runs in typically xterm terminal here.

And from within that xterm terminal when running TSE inside it one can NOT set or change the font size, by Linux xterm design.

For example this will not work at all (=compiles OK and runs but does nothing):

PROC Main()
 SetFont( "Monospace", 9, _NONE_ )
END

===

What does work instead is to start a new xterm from within TSE for Linux:

proc SetFontSize(integer size)
    string cmd[255]=""
    cmd = "xterm -fa 'Monospace' -fs " + Str(size) + " -e '/mnt/c/temp/tse_linux/tse/e' &"
    Dos(cmd, _DONT_PROMPT_)
end

proc Main()
    SetFontSize(14)
end

That will successfully open a new xterm window with font size set to 14..

But of course that is not really a feasible solution or workaround either because starting a brand new xterm
terminal with no connection information to the current already running xterm.

---

And starting yourself an xterm terminal to begin with e.g. with font size 6 might work to show those many
MENU entries, but is not really a workable solution
afterwards because you having to work with such a small font (e.g. 6) (and not being able to change that from within the current xterm thus)

start wsl -d Ubuntu -- sudo mount -t drvfs F: /mnt/f ^& xterm -fa Monospace -ge 118x29 -fs 6 -e "/mnt/c/temp/tse_linux/tse/e" -e "/mnt/c/temp/tse_linux/knud/knudstartlinux" "/mnt/c/temp/tse_linux/knud/ddd.s"

---

Workarounds would be to use (thus instead of a TSE MENU) a different data structure for menus, e.g. using a 

 LList()

 List() 

 ... 

but that
would mean having to reprogram, restructure and recompile something like 1500 MENUs in my TSE source code, which is also not really a feasible solution or feasible workaround.

===

A best solution would be if it could be resolved on native TSE level (and for Microsoft Windows and 
for Linux), e.g. somehow allowing more menu options than fit on the current screen and font size,
e.g. by implementing scrolling of the menu options when the menu options should not fit on the screen.


with friendly greetings
Knud van Eeden








Reply all
Reply to author
Forward
0 new messages