Patch level : 10.0

Files correlati     : tutti
Ricompilazione Demo : [ ]
Commento            :
Migliorata forzatura del focus ad una cella di una griglia


git-svn-id: svn://10.65.10.50/trunk@18356 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-02-25 16:53:27 +00:00
parent 9b5bca12ce
commit 97149ea317

View File

@ -3052,12 +3052,18 @@ void TSheet_field::set_focus_cell_id(long rec, short cid)
{
TSpreadsheet* s = (TSpreadsheet*)_ctl;
//qui
const int col = s->cid2col(cid);
const int row = s->rec2row(rec);
const int col = s->cid2col(cid);
s->set_focus_cell(rec, col);
// Controlla che la cella sia veramente visibile
int first_col, last_col, first_row, last_row;
xi_get_visible_columns(s->_obj, &first_col, &last_col);
xi_get_visible_rows(s->_obj, &first_row, &last_row);
if (col >= first_col && col <= last_col && row >= first_row && row <= last_row)
s->set_focus_cell(row, col);
else
s->select(rec, col, true);
}
bool TSheet_field::on_key(KEY k)