1. Home
  2. Computing & Technology
  3. Delphi Programming
Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back

Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
 

InputBox

unit
Dialogs
category
Dialog and Message routines

declaration
function InputBox(const ACaption, APrompt, ADefault: string): string;

description
InputBox displays an input dialog box that enables the user to enter a string.

ACaption is the caption of the dialog box, APrompt the text that prompts the user to enter input in the edit box, and ADefault appears in the edit box when the dialog box first appears. InputBox returns the string in the edit box if the user chooses the OK button, and default string if the Cancel button was pressed.

example
uses Dialogs;
...
var s, name : string;

s:='default name';

name:=InputBox('Name input',
               'Please enter your name', s)

in real code

see also
InputQuery,


 Free Delphi code snippet inside every Delphi Newsletter!
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?
Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.