Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Customising the Status Line===== ^Published By^Date^Version^Knowledge Level^Keywords^ |Sprezzatura Ltd|01 AUG 1992|2.12+|EXPERT|STATUS, LINE, SYS.TEXT_PARMS| When designing applications with an AREV "look and feel" it can be desirable to create highlighted words on the bottom status line (as with the system help level 2 function keys). In addition, when indicating cursor key movement it makes sense to use the arrow characters to illustrate the keys to press rather than spelling out "Cursor Left", "Cursor Right" etc. Two minor points need to be made before the explanation proper begins. Firstly, Status Line images are now stored in SYS.TEXT_PARMS, with a key of Process*Status (or Process2*Status for help level 2 images). Secondly, there are now only two supported help levels, 0 and 2. Whilst it is possible to use a help level of 1 this can lead to problems. When adding new status line images it behoves us to cater for both levels of user, so two status line images should be created per process, one for level 0 and one for level 2. Statup will automatically select the correct image when asked to load Process. This discussion will concentrate on level 2 status images but it can be amended for level 0. The layout of the status line image is documented in various places (UTILITY subdirectory on pre release 2.0, Programmer's Reference on 2.1, System Subroutines book) but the field that is of interest when customising highlighted words, is field 2. This field (in a level 2 status line) contains four multivalues, three for the top three boxes of the status line and the fourth for the bottom line. Highlighted words can only be put into the fourth multivalue. ==== Very Simple Program to Test Amended Status Lines ==== So that the new status lines can be tested, a simple program such as the one following can be used. Simply compile, catalog and attach to a macro key <code> Subroutine TestStat /* Note that with help level 2 this will display record SPREZZ2 */ Call Statup(4,"SPREZZ",Save) Call Input.Char(x) Call Statup(5,"", Save) Return </code> ==== Adding Highlighted Words ==== The key point here is the use of hyphens. In multivalue 4, everything up to the first hyphen will be highlighted, then after the first hyphen, every word before a hyphen will be highlighted. Thus if a record were created called SPREZZ2*STATUS with a layout as follows <code> MENU SprezzýRevM ýField 3ýThis is Highlighted-This Isn't-ThisIs-This Isn't 1 </code> it would appear on the status line as follows <code> ³Sprezz³RevM ³Field 3 ³ ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³This is Highlighted-This Isn't-ThisIs-This Isn't³ </code> Note then that to give the illusion of multiple words being highlighted, mixed capitalisation must be used (I.E. ThisIs, rather than This Is, where only the Is would be highlighted). Note further that when the text in the record is shorter than the width of the status line cell, a number of spaces must be appended after the text to display to the width of the cell. With the final cell this can be made easier by appending a value mark. ==== Adding Arrow Characters To the Status Line ==== Unfortunately the ASCII characters for the various arrow symbols cannot be added directly into the status line as they cause the screen to become corrupted. To get around this, a fix has been provided. It would not be uncharitable to describe this fix as a kludge. Essentially, five characters have been provided that are taken by the system to mean that they should be replaced with arrow characters when they are bracketed by *'s and a flag variable is set. The characters and their meanings are as follows |#|Þ (represents a double headed arrow)| |~|| |%%|%%|| |%%^%%|| |`|| The flag variable is that somewhere in the preceding text, a ^ should have been entered. For convenience it is recommended that this be the first character on the line although this is not strictly necessary (see note 1). Thus the the status record <code> MENU ^SprezzýRev*^* M ýý*~*-Move Left *³*-Move Right 1 </code> would appear on the status line as follows <code> ³Sprezz³RevM ³....... ³ ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³-Move Left -Move Right ³ </code> **Note 1**: Thus the example given could also have achieved the same results if rendered <code> SprezzýRe^v*^*Mýý*~*-Move Left *|*-Move Right </code> (Volume 4, Issue 4, Pages 6-7) tips/revmedia/v4i4a4.txt Last modified: 2024/06/19 20:20by 127.0.0.1