Patch level : 10.0 250
Files correlati : Ricompilazione Demo : [ ] Commento : error_box invece della segnalazione nella status bar sugli sheet in caso di errore git-svn-id: svn://10.65.10.50/trunk@18353 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8049a0176b
commit
f0e91f172f
@ -625,15 +625,9 @@ bool TMask_field::error_box(
|
||||
{
|
||||
build_msg();
|
||||
if (mask().is_sheetmask() && !mask().is_running())
|
||||
{
|
||||
xvt_dm_post_speech(_msg, 0, TRUE);
|
||||
xvtil_statbar_set(_msg);
|
||||
beep(2); // Error sound
|
||||
}
|
||||
mask().get_sheet()->error_box(_msg);
|
||||
else
|
||||
{
|
||||
mask().post_error_message(_msg, 3);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -377,7 +377,8 @@ public:
|
||||
void set_notify(SPREADSHEET_NOTIFY n)
|
||||
{ _notify = n; }
|
||||
// @cmember aggiunge una riga
|
||||
bool TSpreadsheet::add_row_auto();
|
||||
bool add_row_auto();
|
||||
bool error_box(const char * msg);
|
||||
|
||||
// @cmember Costruttore
|
||||
TSpreadsheet(WINDOW parent, short dlg, short x, short y, short dx, short dy, const char* maskname, int maskno, const char* head, TSheet_field* owner);
|
||||
@ -2506,6 +2507,18 @@ bool TSpreadsheet::add_row_auto()
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TSpreadsheet::error_box(const char * msg)
|
||||
{
|
||||
_check_enabled = false;
|
||||
xvt_dm_post_speech(msg, 0, TRUE);
|
||||
const int r = _cur_row;
|
||||
const int c = _cur_col;
|
||||
::error_box(msg);
|
||||
xvt_scr_set_focus_vobj(parent());
|
||||
set_focus_cell(r, c);
|
||||
_check_enabled = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TSheet_field
|
||||
@ -3035,6 +3048,18 @@ void TSheet_field::set_focus_cell(int riga, int colonna)
|
||||
s->set_focus_cell(riga, colonna);
|
||||
}
|
||||
|
||||
void TSheet_field::set_focus_cell_id(long rec, short cid)
|
||||
{
|
||||
TSpreadsheet* s = (TSpreadsheet*)_ctl;
|
||||
|
||||
//qui
|
||||
|
||||
const int row = s->rec2row(rec);
|
||||
const int col = s->cid2col(cid);
|
||||
|
||||
s->set_focus_cell(rec, col);
|
||||
}
|
||||
|
||||
bool TSheet_field::on_key(KEY k)
|
||||
{
|
||||
if (k == K_TAB && items() > 0)
|
||||
@ -3467,3 +3492,9 @@ bool TSheet_field::esporta() const
|
||||
|
||||
return true;
|
||||
}
|
||||
bool TSheet_field::error_box(const char * msg)
|
||||
{
|
||||
TSpreadsheet& s = (TSpreadsheet&)*_ctl;
|
||||
|
||||
return s.error_box(msg);
|
||||
}
|
||||
|
@ -100,11 +100,14 @@ protected:
|
||||
virtual void mask2row(int n, TToken_string & rec);
|
||||
// @cmember Ricopia i campi del record <p n>-esimo nella maschera
|
||||
virtual void row2mask(int n, TToken_string & rec, int mode = 0x3);
|
||||
// @cmember Permette di mettere il focus su una cella
|
||||
void set_focus_cell(int riga, int colonna);
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
// @cmember Permette di mettere il focus su una cella
|
||||
void set_focus_cell(int riga, int colonna);
|
||||
|
||||
// @cmember Permette di mettere il focus su una cella
|
||||
void set_focus_cell_id(long rec, short cid);
|
||||
|
||||
// @cmember Gestisce la pressione del tasto (true se la gestione ha avuto successo)
|
||||
virtual bool on_key(KEY k);
|
||||
@ -278,6 +281,9 @@ public:
|
||||
|
||||
bool esporta() const;
|
||||
|
||||
bool error_box(const char * msg);
|
||||
|
||||
|
||||
// @cmember Costruttore
|
||||
TSheet_field(TMask* m);
|
||||
// @cmember Distruttore
|
||||
|
Loading…
x
Reference in New Issue
Block a user