//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "InputQuery.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: InputQuery
// Routine: Dialogs.InputQuery

// BeginCode
/*
This example uses a button and a label on the form. When the
user clicks the button, the input box displays. If the user
chooses OK, the string that appears in the edit box of the
dialog box displays as the caption of the label on the form.
If the user chooses Cancel, the dialog box closes and the
caption of the label remains unchanged.
*/
#include <dialogs.hpp>
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  UnicodeString NewString = "Default String";
  if (InputQuery("Input Box", "Prompt", NewString))
    // NewString has been changed by the user, who clicked ok
    Label1->Caption = NewString;
}
// EndCode
// EndExample: InputQuery
//---------------------------------------------------------------------------
