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

#include <vcl.h>
#pragma hdrstop

#include "OnGetEditText.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: OnGetEditText
// Method: Grids.TCustomDrawGrid.OnGetEditText

// BeginCode
/*
The following code lowercases the text for a string grid
cell when the user begins to edit it.
*/
void __fastcall TForm1::StringGrid1GetEditText(TObject *Sender, int ACol, int ARow,
		  UnicodeString &Value)
{
  Value = AnsiLowerCase(Value);
}

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  StringGrid1->Cells[2][0] = "Phone Number";
  StringGrid1->Cells[2][1] = "(408)984-1234";
  StringGrid1->Cells[2][2] = "(415)434-6789";
  StringGrid1->Cells[2][3] = "(650)696-2345";
  StringGrid1->Cells[2][4] = "(831)431-2422";
  StringGrid1->Cells[2][5] = "(408)506-9876";
  StringGrid1->Cells[1][0] = "Name";
  StringGrid1->Cells[1][1] = "Clem Myers";
  StringGrid1->Cells[1][2] = "Ed Satchel";
  StringGrid1->Cells[1][3] = "Johanna Mills";
  StringGrid1->Cells[1][4] = "Stella Gables";
  StringGrid1->Cells[1][5] = "Ted Thompson";
  StringGrid1->Cells[3][0] = "POB";
  StringGrid1->Cells[3][1] = "Detroit";
  StringGrid1->Cells[3][2] = "Memphis";
  StringGrid1->Cells[3][3] = "New Orleans";
  StringGrid1->Cells[3][4] = "Lander";
  StringGrid1->Cells[3][5] = "Round Pond";
  StringGrid1->Cells[4][0] = "State";
  StringGrid1->Cells[4][1] = "Michigan";
  StringGrid1->Cells[4][2] = "Tennessee";
  StringGrid1->Cells[4][3] = "Lousiana";
  StringGrid1->Cells[4][4] = "Wyoming";
  StringGrid1->Cells[4][5] = "Maine";
  StringGrid1->Cells[5][0] = "Last Graduated";
  StringGrid1->Cells[5][1] = "Michigan State";
  StringGrid1->Cells[5][2] = "Univ-> Colorado";
  StringGrid1->Cells[5][3] = "Univ-> Washington";
  StringGrid1->Cells[5][4] = "USC";
  StringGrid1->Cells[5][5] = "Bowdoin";
}
// EndCode
// EndExample: OnGetEditText
//---------------------------------------------------------------------------
