Pop-up Text Boxes


Pop-up text boxes are very effective ways to display information to the user during the execution of a command file. To display a pop-up text box, use the @POP function. @POP accepts a name for the text box, the x- and y-coordinates where it will be displayed, and the message text.


Pop-up text boxes allow you to display messages longer than the status line, as well as to display multiple messages at the same time. You can simply @POP different messages, as long as each pop-up text box has a unique name. In order for the user to read the pop-up text boxes, you must pause the command file execution by using @PAUSE, @SUSPEND, @SUSPEND_NOPASS, @WAIT, or @WAITKEY. After pausing, @UNPOP the message box(es). Remember that if you have multiple pop-up text boxes displayed at the same time, you must @UNPOP them in reverse order.


Messages that you display in a pop-up text box are fixed. That is, they accept a fixed string, and you cannot pass a DADiSP command to @POP and expect it to be evaluated before being displayed. Pop-up text boxes are also placed on the screen in a fixed position determined by the x- and y-coordinates passed to @POP in the command file; the user cannot reposition the displayed message boxes.


The colors of the pop-up text box are set by the global colors in the dspcolor file:


 RED   ! 8 popmes_background_color

 WHITE ! 12 poptext_foreground_color

 WHITE ! 24 pop_hilite

 BLACK ! 25 pop_shadow


You can change the colors of the pop-up text boxes during a command file by using the SETGCOLOR command. For example, to set the colors to light red text on a black background, use the command:


 SETGCOLOR(8, black);SETGCOLOR(12, lred)


To dynamically change the fonts in your pop-up text boxes, use SETCONF to change POPBOX_FONT and the other POPBOX related parameters in the dadisp.cnf file. See the dadisp.cnf file or Appendix B of the DADiSP User Manual, "Modifying the DADiSP Configuration File", for more information.


The following command file demonstrates some pop-up text box message options:



! PopText.dsp


"This message uses default colors and

is centered in the application window.")




This message is displayed near the upper  


left corner of the application window and  


is double spaced. 



@UNPOP("p2") @UNPOP("p1") ! note: unpop p1 and p2 in reverse order

setgcolor(8,lpurple) @CR

setgcolor(12,yellow) @CR


" This message is a different color. ")



setgcolor(8,black) @CR

setgcolor(12,lred) @CR


" This message is light red on black. ")