<< ibec_Format | IBEBlock | ibec_PasswordQuery >>

ibec_InputQuery

The ibec_InputQuery function displays an input dialog that enables the user to enter a string.

Syntax

 function ibec_InputQuery(const ACaption, APrompt: string; var Value: string): Boolean;

Description

Call ibec_InputQuery to bring up an input dialog box ready for the user to enter a string in its edit box. The ACaption parameter is the caption of the dialog box, the APrompt parameter is the text that prompts the user to enter input in the edit box, and the Value parameter is the string that appears in the edit box when the dialog box first appears.

If the user enters a string in the edit box and selects OK, the Value parameter changes to the new value. InputQuery returns True if the user selects OK, and False if the user selects Cancel or presses the [Esc] key.

Example

      execute ibeblock
      as
      begin    
        ...
        Caption = '
        Mes = ibec_Format('There are now s', 1000, 'MYTABLE');
        ibec_ShowMessage(Mes);
      end 

The password feature was added in April 2014, and enables you to enter a password (for example to be used in an after start script) which cannot be seen.

Example with password

 execute ibeblock
 as
 begin
    pwd='';
    if (ibec_InputQuery('Start','Please enter password',pwd))
    then
      if (pwd='123') then
        ibec_enablefeature(0);
      else
      begin
        ibec_disablefeature(0);
        ibec_EnableFeature(1003);  --enable Tools menu
        ibec_EnableFeature(1037);  --enable menuitem tools-data analysis
      end
 end


See also:
ibec_PasswordQuery

back to top of page
<< ibec_Format | IBEBlock | ibec_PasswordQuery >>