TextBox - display a dialog box

Return to Introduction  Previous page  Next page

TextBox("prompt"[,"caption"] [,BackButton(label)] [,NOBUTTONS]
       [,WindowPos(CENTER)])
       [,WindowPos(CENTRE)]
       [,WindowPos(DEFAULT)]
       [,WindowPos(CURSOR)]
       [,WindowPos(top,left[,width,height][,PIXELS])]
       [,WindowPos(row,col[,width,height],ROWCOL)]
       [,WindowPos(row,col[,width,height],CURSOR)])

 

Where:

prompt

is the text to display in the text dialog box. This parameter may be a variable containing the message text.

caption

is the caption that appears in the title bar of the message box. If omitted, the caption will be "TN3270 Plus". This parameter may be a variable containing the message box caption.

BackButton(label)

If specified, the Cancel button in the TextBox dialog is replaced by the Back button. If the Back button is clicked, the script will continue at the specified label.

NOBUTTONS

displays the Text Box without any buttons. Click the red X in the top right corner to close the dialog box and continue the script.

WindowPos(CENTER)

centers the Text Box dialog box over the TN3270 Plus terminal window.

WindowPos(CENTRE)

centers the Text Box dialog box over the TN3270 Plus terminal window.

WindowPos(DEFAULT)

centers the Text Box dialog box over the TN3270 Plus terminal window. This is the default if the WindowPos parameter is not specified.

WindowPos(CURSOR)

positions the top left corner of the Text Box dialog box at the cursor location.

WindowPos(top,left[,width,height][,PIXELS])

positions the top left corner of the Text Box dialog box at the specified pixel offset from the top left corner of the TN3270 Plus window. top and left are the offset in pixels. The offset may be negative to move the dialog box outside the TN3270 Plus window. width and height define the size of the dialog box in pixels.

WindowPos(row,col[,width,height],ROWCOL)

positions the top left corner of the Text Box dialog box at the specified row and column in the TN3270 Plus terminal window. width and height define the size of the dialog box in terminal rows and columns.

WindowPos(row,col[,width,height],CURSOR)

positions the top left corner of the Text Box dialog box at the specified row and column offset from the cursor location in the TN3270 Plus terminal window. width and height define the size of the dialog box in terminal rows and columns.

 

prompt, caption, top, left, row, col, width and height may be variables.

 

The TextBox command pauses the script and displays a dialog box that contains a message for the user. The Text Box dialog box displays the prompt and OK and Cancel buttons. Click the OK button to continue script processing. Click the Cancel button to cancel the script. If the "NOBUTTONS" option is used, the window is closed by clicking the red X in the top right corner and the script continues (it cannot be canceled).

Examples

TextBox("Process complete.")

TextBox("Process complete.","File Transfer")

TextBox("Process complete.",NOBUTTONS)

TextBox("Process complete. Click Back button to repeat the process.","Compute",BACKBUTTON("REPEAT:"))

TextBox("Process complete.",NOBUTTONS,WindowPos(10,10))

 

Sample Script

 

$Prompt = "Whose woods these are I think I know." & chr(10) & _

"His house is in the village though;" & chr(10) & _

"He will not see me stopping here" & chr(10) & _

"To watch his woods fill up with snow." & chr(10) & chr(10) & _

"My little horse must think it queer" & chr(10) & _

"To stop without a farmhouse near" & chr(10) & _

"Between the woods and frozen lake" & chr(10) & _

"The darkest evening of the year." & chr(10) & chr(10) & _

"He gives his harness bells a shake" & chr(10) & _

"To ask if there is some mistake." & chr(10) & _

"The only other sound's the sweep" & chr(10) & _

"Of easy wind and downy flake." & chr(10) & chr(10) & _

"The woods are lovely, dark and deep," & chr(10) & _

"But I have promises to keep," & chr(10) & _

"And miles to go before I sleep," & chr(10) & _

"And miles to go before I sleep."

TextBox($Prompt,"A Poem by Robert Frost")

 

DialogTextBox

 

See Also:

 

MsgBox

Script Command Summary

Script Variables

Using the Scripting Language

 


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.