- May
- 239
- 2
Using TCMD 9.02.151.
I have defined the following function for starting a @select window maximized to the whole screen. I run it from TCMD.
ypos=%@FIELD[0,%@winpos[%_winfgwindow]]
xpos=%@FIELD[1,%@winpos[%_winfgwindow]]
: %1 = filename, %2 = window title
selectwinmax=%@select[%1, %@eval[0-%@ypos[]], %@eval[0-%@xpos[]], %@eval[%_ypixels-%@ypos[]], %@eval[%_xpixels-%@xpos[]], %2]
Ex: set entry="%@selectwinmax[c:\datalist.txt,Select entry]"
It works well when the filename parameter contains less lines than fits on the screen. Then the @select window is positioned so that the upper left corner is placed in the upper left corner of the screen and the bottom right corner is placed to the right of the screen.
The bottom of the window ends when the lines in the file ends.
When the file contains more lines than fits on the screen however, there are some problems. In that case it seems that the bottom of the @select window is placed at the top of the screen so that the whole window is invisible. If you move the window (Alt-Space to open menu and then select move) its size corresponds to the size of the screen.
This has worked well previously on older TCMD/TCC versions but not any longer. Has there been any change in the @select behavior or is there an error in my function definition?
I have defined the following function for starting a @select window maximized to the whole screen. I run it from TCMD.
ypos=%@FIELD[0,%@winpos[%_winfgwindow]]
xpos=%@FIELD[1,%@winpos[%_winfgwindow]]
: %1 = filename, %2 = window title
selectwinmax=%@select[%1, %@eval[0-%@ypos[]], %@eval[0-%@xpos[]], %@eval[%_ypixels-%@ypos[]], %@eval[%_xpixels-%@xpos[]], %2]
Ex: set entry="%@selectwinmax[c:\datalist.txt,Select entry]"
It works well when the filename parameter contains less lines than fits on the screen. Then the @select window is positioned so that the upper left corner is placed in the upper left corner of the screen and the bottom right corner is placed to the right of the screen.
The bottom of the window ends when the lines in the file ends.
When the file contains more lines than fits on the screen however, there are some problems. In that case it seems that the bottom of the @select window is placed at the top of the screen so that the whole window is invisible. If you move the window (Alt-Space to open menu and then select move) its size corresponds to the size of the screen.
This has worked well previously on older TCMD/TCC versions but not any longer. Has there been any change in the @select behavior or is there an error in my function definition?