Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
//---------------------------------------------------------------------------
// CUT COPY AND PASTE FUNCTIONS: WORKS WITH GRID!
//---------------------------------------------------------------------------
void __fastcall TMainForm::Cut1Click(TObject *Sender)
{
if(((dynamic_cast<TDBGrid *>(ActiveControl))
&&(dynamic_cast<TDBGrid *>(ActiveControl)->EditorMode))
&&(dynamic_cast<TInplaceEdit*>(ActiveControl->Controls[0])->SelLength > 0))
ActiveControl->Controls[0]->Perform(WM_CUT, 0, 0);
else ActiveControl->Perform(WM_CUT, 0, 0);
}
//---------------------------------------------------------------------------
void __fastcall TMainForm::Copy1Click(TObject *Sender)
{
if(((dynamic_cast<TDBGrid *>(ActiveControl))
&&(dynamic_cast<TDBGrid *>(ActiveControl)->EditorMode))
&&(dynamic_cast<TInplaceEdit*>(ActiveControl->Controls[0])->SelLength > 0))
ActiveControl->Controls[0]->Perform(WM_COPY, 0, 0);
else ActiveControl->Perform(WM_COPY, 0, 0);
}
//---------------------------------------------------------------------------
void __fastcall TMainForm::Paste1Click(TObject *Sender)
{
if ((dynamic_cast<TDBGrid *>(ActiveControl))
&& (dynamic_cast<TDBGrid *>(ActiveControl)->EditorMode))
ActiveControl->Controls[0]->Perform(WM_PASTE, 0, 0);
else ActiveControl->Perform(WM_PASTE, 0, 0);
}
//---------------------------------------------------------------------------