0

I want to create an application with all of the traditional shell features (command history by pressing up/down, autocomplete with Tab, etc.) which will also allow for a couple of static rows at the top of the window (as text) in which I wish to display status information. i.e., when the user scrolls through the output, the static rows of status text remain in place. I cannot find any tool which satisfies what I'm looking for, although perhaps I just lack the jargon to find it.

  • I can't find any text-freezing feature in PowerShell or other shells or terminals
  • CUIs such as GUI.cs can easily provide "header" text elements which stay in place, but can't fully emulate a console window (where some text is editable and some is not, with history and functional autocomplete, etc) without a seemingly overwhelming amount of work

The closest I've come to finding what I'm looking for is ConEmu, which can be used to integrate shells into WinForms. I suspect that I could smash together some UI elements alongside a PowerShell element to display status information in a way which would be unaffected by scrolling, assuming I'm understanding its use correctly. Is this an appropriate solution, or is there a better way?

1 Answers1

1

The scrolling region of an ANSI terminal can be programmed with a simple escape sequence. To update the region outside of the scrolling area, you can save the current cursor position, position the cursor in the protected area, do the output, and then restore the cursor position.

However, this feature does not integrate with the scroll back feature found in terminal emulators. It sort of does if you put the protected area at the bottom of the screen, allowing output to scroll out of the top line. The protected area will not stay in place while the user scrolls back, though.

Kaz
  • 55,781
  • 9
  • 100
  • 149