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

#include <vcl.h>
#pragma hdrstop

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

// BeginCode
/*
This code assigns a two-part string to the Hint property
of an edit box and then displays the "short" or first part
of the string as the text of the edit box.
This example requires a button, a test edit and a statusbar.
Set the AutoHint property and the SimplePanel property to
True for the statusbar.  Set the ShowHint property to True
for the text edit and the form.
Notice that the short hint is used for the text edit hint
and the long hint is used for the statusbar.
*/
void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
  Edit1->Hint = "Name|Enter full name";
  Edit1->Text = GetShortHint(Edit1->Hint);
}
// EndCode
// EndExample: ControlsGetShortHint
//---------------------------------------------------------------------------
