TCL Command to Bring Up Status Bar (AREV Specific)
At 15 MAR 1998 12:38:08AM TimDress@aol.com wrote:
Does anyone know if there is a TCL command that would bring up the Status Bar and then one to make it disappear. I am trying to have the status bar appear when I perform a SSELECT to visualize the Record Selecting that is occuring. If possible, it would be used something like this,
PERFORM 'STATUS BAR ON'
PERFORM 'SSELECT INVOICES.PAID BY PAY.DATE'
PERFORM 'STATUS BAR OFF'
Normally, our program runs without the Status Bar to give more screen space.
Thanks,
Tim
At 15 MAR 1998 01:16AM Matt Sorrell wrote:
Tim,
If, as it looks like you are, you are executing these commands from inside an R/BASIC program, there is a global variable that controls whether or not the status bar is visible. The variable name is @STATUS.ON . It can assume two values, 0 (zero) or 1 (one). Obviously, these are boolean true and false. If set to zero, status bar is off. If set to one, then status bar is on. There are several of my programs in which I am doing a custom write to the status bar, and when I do a select, or call another program that does a select, I'll turn the status bar off, and then when the process is over, I'll turn it back on.
However, I believe this only applies to whether or not the status bar is update. If, at the application level, you have the status bar disabled, then it will not display at all. To my knowledge there is not a way around this, but someone else may know of one.
Matt Sorrell
At 15 MAR 1998 06:11AM Andre w P McAuley wrote:
We covered this in an old FKB so it may not be as relevant as it used to be. Unfortunately I won't hit the office for a day or so and don't have FKB at home. Anyone out there with a copy has my permission to post the article.
Regards
amcauley@sprezzatura.com
World Leaders in all things RevSoft
At 16 MAR 1998 12:15AM Don Bakke wrote:
I'm not sure if this will answer the right questions, but I found a couple of articles that seemed to relate to this topic (one from Revelation and one from Sprezzatura). Here the are:
Enabling And Disabling The Status Line In An R/basic Program Page: 1Document: R57 Date:30 JUL 1990Author: Revelation TechnologiesLevel: IntermediateWhile running an R/BASIC program, you may want to access all areas of thescreen, including the area occupied by the status line. If the status lineis on, you will need to turn it off temporarily. This can be accomplished byfollowing these steps:
Set the screen height to the desired level.
Store the current screen image.
Turn the status line off.
Clear the screen.
Do your processing.
Turn the status line back on.
Restore the screen image.
Restore the screen height.Figure 1 provides an example of these steps.In other cases you may wish to temporarily prevent the status line frombeing updated during part of your program. For example, you may not want theuser to see all of the system information that displays on the status linewhen your program does a PERFORM "SELECT...." The system variable @STATUS.ONcan be changed to prevent the updates to the status line. Figure 2 showsthis technique.Figure 1DECLARE FUNCTION ESC.TO.ATTRDECLARE SUBROUTINE VIDEO.RW
Change the screen height.@CRTHIGH += 3
Save the screen image.VIDEO.RW(0, 0, @CRTWIDE - 1, @CRTMAXHIGH - 1,'R', IMAGE)
Turn off updates to the status line.SAVE_STATUS=@STATUS.ON@STATUS.ON =0
Clear the screen. @AW contains the background color
for all windows.ATTR=ESC.TO.ATTR(@AW)BACKCHAR=@ENVIRON.SET ;* The backdrop character.VIDEO.RW(0, 0, @CRTWIDE - 1, @CRTMAXHIGH - 1,'C', BACKCHAR:ATTR)
Processing goes here.
Restore updates to the status line.@STATUS.ON=SAVE_STATUSEnabling And Disabling The Status Line In An R/basic Program Page: 2
Restore the screen image.VIDEO.RW(0, 0, @CRTWIDE - 1, @CRTMAXHIGH - 1, 'W', IMAGE)
Restore the screen height.@CRTHIGH -= 3
END OF PROGRAMSTOPFigure 2@STATUS.ON=0PERFORM 'SELECT SAMPLE_CUSTOMER BY STATE (S'@STATUS.ON=1Customising The Status Line Page: 1
Document: V4I4A4 Date:01 AUG 1992Author: Sprezzatura LtdLevel: ExpertWhen designing applications with an AREV "look and feel" it can be desirableto create highlighted words on the bottom status line (as with the systemhelp level 2 function keys). In addition, when indicating cursor keymovement it makes sense to use the arrow characters to illustrate the keysto 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 ofProcess*Status (or Process2*Status for help level 2 images). Secondly, thereare now only two supported help levels, 0 and 2. Whilst it is possible touse a help level of 1 this can lead to problems.When adding new status line images it behoves us to cater for both levels ofuser, so two status line images should be created per process, one for level0 and one for level 2. Statup will automatically select the correct imagewhen asked to load Process. This discussion will concentrate on level 2status images but it can be amended for level 0.The layout of the status line image is documented in various places (UTILITYsubdirectory on pre release 2.0, Programmer's Reference on 2.1, SystemSubroutines book) but the field that is of interest when customisinghighlighted words, is field 2. This field (in a level 2 status line)contains four multivalues, three for the top three boxes of the status lineand the fourth for the bottom line. Highlighted words can only be put intothe fourth multivalue.Very Simple Program to Test Amended Status LinesSo that the new status lines can be tested, a simple program such as the onefollowing can be used. Simply compile, catalog and attach to a macro keySubroutine 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)ReturnAdding Highlighted WordsThe key point here is the use of hyphens. In multivalue 4, everything up tothe first hyphen will be highlighted, then after the first hyphen, everyword before a hyphen will be highlighted. Thus if a record were createdcalled SPREZZ2*STATUS with a layout as followsMENUSprezzRevMField 3Customising The Status Line Page: 2
This is Highlighted-This Isn't-ThisIs-This Isn't1it would appear on the status line as follows³Sprezz³RevM ³Field 3 ³ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´³This is Highlighted-This Isn't-ThisIs-This Isn't³Note then that to give the illusion of multiple words being highlighted,mixed capitalisation must be used (I.E. ThisIs, rather than This Is, whereonly the Is would be highlighted). Note further that when the text inthe record is shorter than the width of the status line cell, a number ofspaces 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 LineUnfortunately the ASCII characters for the various arrow symbols cannot beadded directly into the status line as they cause the screen to becomecorrupted. To get around this, a fix has been provided. It would not beuncharitable to describe this fix as a kludge.Essentially, five characters have been provided that are taken by the systemto mean that they should be replaced with arrow characters when they arebracketed by *'s and a flag variable is set. The characters and theirmeanings are as follows# Þ (represents a double headed arrow)~ ?|^`The flag variable is that somewhere in the preceding text, a ^ should havebeen entered. For convenience it is recommended that this be the firstcharacter on the line although this is not strictly necessary (see note 1).Thus the the status recordMENU^SprezzRev*^* M
~*-Move Left *³*-Move Right1would appear on the status line as follows³Sprezz³RevM ³....... ³ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´Customising The Status Line Page: 3
³?-Move Left -Move Right ³Note 1:Thus the example given could also have achieved the same results if renderedSprezzRe^v*^*M
~*-Move Left *|*-Move Right(Volume 4, Issue 4, Pages 6-7)