Permesso l'inserimento di campi e di chiavianche in mezzo al tracciato record
git-svn-id: svn://10.65.10.50/trunk@1670 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
79fa686e12
commit
da954db822
@ -197,46 +197,10 @@ bool TRec_sheet::key_notify(int r, KEY k)
|
||||
|
||||
f.disable_cell(0, 1);
|
||||
if (f.items() >= 8) return FALSE;
|
||||
if (items > 1)
|
||||
{
|
||||
const int s = f.selected() + 1;
|
||||
|
||||
for (int i = items - 1; i > s ; i--)
|
||||
{
|
||||
TToken_string & r1 = f.row(i);
|
||||
const TToken_string & r = f.row(i - 1);
|
||||
r1 = r;
|
||||
}
|
||||
f.row(s) = "";
|
||||
f.force_update();
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TRec_sheet::fld_notify(int r, KEY k)
|
||||
{
|
||||
TSheet_field& f = (TSheet_field&) _mask->field(F_FIELDS);
|
||||
if (k == K_INS)
|
||||
{
|
||||
const int items = f.items();
|
||||
if (items > 1)
|
||||
{
|
||||
const int s = f.selected() + 1;
|
||||
|
||||
for (int i = items - 1; i > s ; i--)
|
||||
{
|
||||
TToken_string & r1 = f.row(i);
|
||||
const TToken_string & r = f.row(i - 1);
|
||||
r1 = r;
|
||||
}
|
||||
f.row(s) = "";
|
||||
f.force_update();
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void TRec_sheet::save()
|
||||
|
||||
{
|
||||
@ -268,7 +232,7 @@ void TRec_sheet::edit()
|
||||
_mask->set (F_NUM, _dir->num());
|
||||
_mask->set (F_DES, _dir->des());
|
||||
f1.sheet_mask().field(FLD_LEN).set_handler(len_handler);
|
||||
f1.set_notify(fld_notify);
|
||||
f1.set_append(FALSE);
|
||||
int nfields = _rec->fields();
|
||||
|
||||
f1.enable_column(FLD_DES - 101, _descr != NULL);
|
||||
@ -281,6 +245,7 @@ void TRec_sheet::edit()
|
||||
f1.row(i).add("");
|
||||
}
|
||||
f2.set_notify(key_notify);
|
||||
f2.set_append(FALSE);
|
||||
int nkeys = _rec->keys();
|
||||
for (i = 0; i < nkeys; i++) f2.row(i) = _rec->keydef(i);
|
||||
f2.disable_cell(0, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user