Re: display on last line
Posted in 1993
In article <21lfu8INNg9u@emory.mathcs.emory.edu>, jparker@hpbs2561.boi.hp.com (Jack Parker) writes: |> > We also tried changing the current window, writing the message, then changing |> > back but this took too much time re-drawing all the window stuff and looked |> > bad (all the flashing re-draws.) |> Had this same problem with a clock in the upper corner once. What I wound |> up doing (pretty kludgy) was defining a function which set current window |> to be the background window and displayed the time. Unfortunately I couldn't |> get it to reset the window using a passed in variable and had to 'manually' |> reset the window each time I called the function, e.g.: I don't know an elegant solution, but we can do a little better than that. First, to avoid screen-flashing: don't put the message on the background window. Instead, create a separate window just for it, positioned at line 24 (or where ever you want the messages to go). And make sure none of the other windows of your application overlap with the message window. Then you can switch back and forth without any flashing. There doesn't seem to be an elegant way to switch back to the previous window. But here's what I did in the one application where the user demanded this feature. This routine takes the message, and a 1 char code identifying the current window, as arguments. function msg_show(msg, w) define msg char(75) define w char(1) current window is mwind message msg clipped attribute (reverse) case w when "p" current window is pwind when "k" current window is kwind when "d" current window is dwind when "i" current window is iwind end case end function This requires that the function know the names of all the other windows, and so it can't be extended to a general purpose library routine :-( And that keeps me from enthusiastically using this technique in other applications :-( But I think it's a bit neater than switching back manually, as in Jack's method. Hope this helps, -- Harry Bochner bochner@das.harvard.edu