Updated April 2011
? tab(-10, AG_STATUSLINES); stslin; ","; visible; ","; textmode; chr(127);
AG_STATUSLINES (34) controls the behavior of the top, bottom and system status lines by making them visible or not, and by specifying fixed or proportional fonts. Making the status lines disappear may give the window a cleaner look, especially if the status lines are not being used. When not visible, the status line space becomes part of the main window (increasing the character cell height). See History, below, for comments on fonts.
Parameters
stslin
Character code indicating which status line is being impacted.
Value |
Description |
1 |
Top status line |
2 |
Bottom status line |
3 |
System status line |
4 |
Save visibility/configuration of all status lines |
5 |
Restore saved configuration |
visible
Value |
Description |
0 |
Invisible |
1 |
Visible |
"" |
No change |
textmode
Value |
Description |
0 |
Fixed pitch font |
1 |
Proportional font |
Examples
? TAB(-10,AG_STATUSLINES);"1,0";chr(127); ! remove top status line
? TAB(-10,AG_STATUSLINES);"2,0";chr(127); ! remove bottom status line
? TAB(-10,AG_STATUSLINES);"1,1";chr(127); ! restore (enable) top status line
Notes
This capability was implemented via a Tab(-10,x) sequence rather than by extending the existing Tab(-1,202) or Tab(-1,203) commands, because those commands to not have terminators and thus we cannot just add optional arguments. Because Tab(-10,x) commands must be terminated with chr(127), they support variable length arg lists.
History
2011 April A-Shell 5.1.1214: Add stslin options to save and restore status line visibility states.
2011 April A-Shell 5.1.1212: Status line enhancement: The top and bottom status lines can now be displayed using a proportional font.
The default textmode is 0, but automatically switches to 1 if any GUI controls are created before an explicit AG_STATUSLINES command is issued. The assumption here is that if you are using GUI text or other controls in the window, you would probably want the status line text to also use that mode. Once you issue an AG_STATUSLINES command, the mode stays fixed until another AG_STATUSLINES command changes it.
Note that the number of characters allowed on the status line does not change between modes, even though typically proportional text is more compact. Also, the proportional text is tokenized (similar to the way the OPTIONS=GUI_SPC_IND feature works) so that any text tokens preceded by two or more spaces will be repositioned to start in the same position as it would have in fixed pitch mode.