mask.cpp Correttas fisrt_focus

maskfld.cpp   Aggiunta gestione k-tab ai listbox
sheet.cpp     Aggiunto 1000 ai cid delle colonne
msksheet.cpp  Aggiornata chiamata alla drop-down list


git-svn-id: svn://10.65.10.50/trunk@3162 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-07-08 10:52:07 +00:00
parent 2d99fb5ad5
commit b1405970da
4 changed files with 22 additions and 16 deletions

@ -265,7 +265,6 @@ int TMask::first_focus(short id)
f = find_first_active(_pagewin[0]);
if (f < 0 && toolwin())
f = find_first_active(toolwin());
_first_focus = f;
}
}
}

@ -3680,7 +3680,7 @@ void TList_field::set(const char* data)
{
const int i = str2curr(data);
current(i);
if (mask().is_running())
// if (mask().is_running())
set_dirty();
}
@ -3737,14 +3737,21 @@ bool TList_field::on_key(KEY key)
on_hit();
}
else
if (validate_func() >= 0 && (key == K_TAB || key == K_ENTER))
{
const bool ok = validate(key);
if (!ok)
if (key == K_TAB || key == K_ENTER)
{
bool ok = TRUE;
if (validate_func() >= 0)
{
if (has_warning())
return error_box(get_warning());
}
ok = validate(key);
if (!ok)
{
if (has_warning())
return error_box(get_warning());
}
}
ok = handler(key);
if (!ok)
return FALSE;
}
return TEditable_field::on_key(key);
}

@ -1042,7 +1042,7 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
XI_OBJ cell; XI_MAKE_CELL(&cell, _obj, _cur_row, _cur_col);
// droppa giu'
TList_field& lst = (TList_field&)(*_edit_field);
TDropDownList ddl(&cell, lst.get_codes(), lst.get_values(), lst.size());
TDropDownList ddl(&cell, lst.get_codes(), lst.get_values());
ddl.open();
while (ddl.is_open())
do_events();

@ -180,7 +180,7 @@ TSheet_control::TSheet_control(
l->rule_color = MASK_DARK_COLOR;
// Definizione della prima colonna (numero di riga)
const long attr = XI_ATR_VISIBLE | XI_ATR_RJUST | XI_ATR_SELECTABLE;
XI_OBJ_DEF* coldef = xi_add_column_def(listdef, FIRST_FIELD-1, attr, FIRST_FIELD,
XI_OBJ_DEF* coldef = xi_add_column_def(listdef, FIRST_FIELD+1000-1, attr, FIRST_FIELD+1000,
NUMBER_WIDTH * XI_FU_MULTIPLE, NUMBER_WIDTH, "");
coldef->app_data = (long)this;
@ -196,7 +196,7 @@ TSheet_control::TSheet_control(
attr |= XI_ATR_SELECTABLE;
if (_type[i] == 'R')
attr |= XI_ATR_RJUST;
coldef = xi_add_column_def(listdef, cid, attr, cid+1,
coldef = xi_add_column_def(listdef, cid+1000, attr, cid+1001,
v_width[i] * XI_FU_MULTIPLE, m_width[i], (char*)h);
coldef->app_data = (long)this;
@ -229,10 +229,10 @@ TSheet_control::TSheet_control(
{
xi_get_rect(_obj, &rct);
if (rct.right < cli.right - 2*XI_FU_MULTIPLE)
const int width = rct.right + 2*XI_FU_MULTIPLE;
if (width < cli.right)
{
const int width = rct.right + 2*XI_FU_MULTIPLE;
cli.left = (cli.right - width) / 2;
cli.left += (cli.right - width) / 2;
cli.right = cli.left + width;
xvt_vobj_translate_points(parent, xvt_vobj_get_parent(parent), (PNT*)&cli, 2);
xvt_vobj_move(parent, &cli);
@ -498,7 +498,7 @@ bool TSheet_control::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
int nm;
XI_OBJ** obj = xi_get_member_list(xiev->v.cell_request.list, &nm);
const int num = xiev->v.cell_request.col_nbr;
const int cid = obj[num]->cid;
const int cid = obj[num]->cid - 1000;
if (cid >= FIRST_FIELD)
{