ику дочірньої форми по вибору зі списку
}
// --------------------------------------------- ------------------------------
void __ fastcall TfrmUniForm :: FormClose (TObject * Sender,
TCloseAction & Action)
{
Action = caFree;
}
// --------------------------------------------- ------------------------------
void __ fastcall TfrmUniForm :: formbtbtnCancelClick (TObject * Sender)
{
Close ();
}
// --------------------------------------------- ------------------------------
void __ fastcall TfrmUniForm :: formbtbtnOKClick (TObject * Sender)
{
if (! form-> tblBrowse-> IsEmpty ())
{
this-> uid = form-> tblBrowse-> FieldByName (desc-> keyfield) -> AsString;
this-> rettitle = form-> tblBrowse-> FieldByName (desc-> listfield) -> AsString;
this-> ModalResult = mrOk;
}
}
// --------------------------------------------- ------------------------------
void __ fastcall TfrmUniForm :: TuneForAccept ()
{
if (form) form-> TuneForAccept ();
accept = true;
if (! desc-> accepttitle.IsEmpty ()) this-> Caption = Desc-> accepttitle;
if (desc-> hideonaccept) this-> Width = 500;
}
// --------------------------------------------- ------------------------------
void __ fastcall TfrmUniForm :: FormDestroy (TObject * Sender)
{
if (desc) delete desc;
if (slv) delete slv;
if (lnk) delete lnk;
for (int r = 0; r Count; r + +)
delete ((TbtnAddInfo *) (btnlst-> Items [r]));
delete btnlst;
for (int r = 0; r Count; r + +)
delete ((TfltAddInfo *) (fltlst-> Items [r]));
delete fltlst;
for (int r = 0; r Count; r + +)
delete ((TfieldAddInfo *) (fldlst-> Items [r]));
delete fldlst;
if (itm) itm-> Enabled = true;
}
// --------------------------------------------- ------------------------------
void __ fastcall TfrmUniForm :: UseReplaces (AnsiString & Title, AnsiString & filter)
{
if (! form-> tblBrowse-> IsEmpty () && ! Form-> tblBrowse-> FieldByName (desc-> keyfield) -> IsNull)
{
StrRpl (title, "% 1", form-> tblBrowse-> FieldByName (desc-> listfield) -> AsString);
StrRpl (filter, "% 1", form-> tblBrowse-> FieldByName (desc-> keyfield) -> AsString);
}
StrRpl (filter, "<<", "|%%");
StrRpl (filter,">>", "%% |");
// врахуємо підстановки полів виду , а також їх можливі NULL
filter = TranslateString (filter, FieldValue);
StrRpl (filter, "|%%", "<");
StrRpl (filter, "%% |",">");
// врахуємо (посилання на інші фільтри) подстанокі виду <