fgl_winprompt()

Displays a dialog box with an input field.

Syntax

CALL fgl_winprompt(x, y, text, default, length, type)

Parameters

x and y, coordinates – column and row – of the left top corner of the dialog box (INTEGER)

text, the text that will be displayed in the dialog box (a string of characters or a variable of the STRING or CHAR data type)

default, the default text that can be displayed to the input field (a string of characters or a variable of the STRING or CHAR data type)

length, the maximum input length (INTEGER)

type, a legacy parameter kept for compatibility reasons, can be set to any INTEGER, usually 0

Usage and examples

fgl_winprompt() produces a partly-customizable dialog box with a simple input field:

CALL fgl_winprompt(1, 2, "Enter any string (max = 25 chars)", "Your input", 25, 0)

 

fgl_winprompt() returns the input value.

If you press OK without any input, the input value will be

 

Parameters x and y have their effect only with jquery Lycia. MD Lycia ignores them and opens all the dialog boxes (including those produced by fgl_winprompt()) in the center of your screen.

However, they are required and you cannot omit them. If you omit them, you will get a runtime error – 102020. Wrong number of function arguments.

 

If the 1st or/and the 2nd parameter is NULL,

If the 3rd argument is NULL, the dialog box will have no text:

CALL fgl_winprompt(5, 5, "", "Your input", 25, 0)

If the 4th argument is NULL, the dialog box will have no default text:

CALL fgl_winprompt(5, 5, "Enter any string (max = 25 chars)", "", 25, 0)

If the 5th argument is NULL, the size of the input field will be limited by the size of the receiving variable:

CALL fgl_winprompt(5, 5, "Enter any string (max = 25 chars)", "Your input", NULL, 0)

If the 6th argument is NULL, nothing will change as the parameter is the legacy one and is kept only for compatibility reasons:

CALL fgl_winprompt(5, 5, "Enter any string (max = 25 chars)", "Your input", 25, NULL)

 

To display the dialog text in several lines, you must add \n in the place where the new line must start:

CALL fgl_winprompt(1, 2, "This is the 1st message line. \nThis is the 2nd message line.", "Your input", 25, 0)

 

Dialog boxes produced by fgl_winprompt() can be customized by css style sheets as any other dialog and message boxes (and most form and window elements).

For example, you can use the selectors .qx-message-box .qx-text to change the appearance of the dialog text.

However, dialog boxes produced by fgl_winprompt() have no specific selectors. This means that your changes will apply to all elements that have the same selector or set of selectors.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.