Show Popup

Richard Kreiss rkreiss at gccconsulting.net
Tue Oct 31 07:50:38 PDT 2017


Windows filePro 5.08.02 64 bit

Ran into an issue yesterday with a show popup that I had not seen before.  I use the show popup to place available key stroke prompts below a browse lookup.  In this particular case I was adding one additional option.

Original program line

SHOW popup("17","-1") "\r A \r-Add, \b4 D \a-Delete, \r U \r-Update, \r X \r-Exit"

Changed to:

SHOW popup("17","-1") "\r A \r-Add, \b4 D \a-Delete, \r U \r-Update, \r C \r-Cards, \r X \r-Exit"

I expected this to be a single line popup.  However, when run, the popup truncated the word Exit splitting it to a second line to -Ex on one line and left justified xt on the other.

After a bit of experimenting, I found that elimination the commas and setting a dummy field xx(75,*) = "\r A \r-Add  \b4 D \a-Delete \r U \r-Update \r X \r-Exit" I had a single line popup as before.

When xx was set to (80,*) the word EXIT was truncated but not when the field was (75,*).

I just changed the program line to read show popup("17","-1") xx , "more Prompts" .  The "more prompts" was located to the lower right and on the last line of the show popup. Window. (see example below)

Using an uncast dummy field zz="\r A \r-Add  \b4 D \a-Delete \r U \r-Update \r X \r-Exit More Prompts", places More Prompts on a second line.

It appears the maximum number of characters before the string truncates is 75. After that the second line appears.

So, it appears one can program the show popup to:

1.      look and work similar to listbox with a prompt option except the need to use waitkey-per example below

2.      popup a single line string - 75 characters or less

3.      popup a 2 line string if the first one is longer than 75 characters

From the *cabe help file:
SHOW POPUP  continued)

Examples:
      then: SHOW POPUP ("-1","-1") "Some text here.", "Press \K4 to Continue"
loop1  if:
      then: xx = waitkey
        if: @sk ne "SAVE"
      then: goto loop1
      then: clears

  This popup     ┌──────────────────────────┐
    will be      │ Some text here.          │
  centered on    └───Press  ESC  to Continue┘
  the screen:                                  <- dropshadow
                                           ^
                                           └─ cursor position

Note: For this example, the prompt will contain  F10  on
non-DOS/Windows systems.
(continued)

Does anyone know if this this is new behavior or just one that I had not run into before?

Richard Kreiss
GCC Consulting

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 20111 bytes
Desc: not available
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20171031/68cfa4ad/attachment.bin>


More information about the Filepro-list mailing list