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

#include <vcl.h>
#pragma hdrstop

#include "GetItemPath.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: GetItemPath
// Method: FileCtrl.TDirectoryListBox.OpenCurrent
// Method: FileCtrl.TDirectoryListBox.GetItemPath

// BeginCode
/*
This example uses a directory list box, a button, and a
label on a form. When the user selects a directory in the
directory list box and clicks the button, the selected
directory opens, and the path of the second directory
displayed in the list box appears as the caption of the
label.
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  DirectoryListBox1->OpenCurrent();
  Label1->Caption = DirectoryListBox1->GetItemPath(1);
}
// EndCode
// EndExample: GetItemPath
//---------------------------------------------------------------------------
