Cambiato colore delle celle col focus

git-svn-id: svn://10.65.10.50/trunk@158 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-09-05 10:58:03 +00:00
parent a51e2b75ba
commit 47dd388b62
4 changed files with 24 additions and 5 deletions

View File

@ -233,7 +233,7 @@ long TApplication::handler(WINDOW, EVENT* ep)
if (can_close()) if (can_close())
quit_OK(); quit_OK();
else else
error_box("Chiudere la finestra attiva prima di chiudere il programma"); error_box("Chiudere la finestra attiva prima di terminare il programma");
} }
else stop_run(); else stop_run();
break; break;

View File

@ -98,7 +98,10 @@ void TMask::control_handler(EVENT* ep)
} }
*/ */
if (test_focus_change(win)) if (test_focus_change(win))
{
set_focus_win(win, FALSE); set_focus_win(win, FALSE);
f->set_focusdirty(FALSE);
}
} }
} }
else else

View File

@ -170,7 +170,7 @@ TSpreadsheet::TSpreadsheet(short x, short y, short dx, short dy,
XI_ATR_ENABLED | XI_ATR_VISIBLE, XI_ATR_ENABLED | XI_ATR_VISIBLE,
NORMAL_COLOR, NORMAL_BACK_COLOR, // normal NORMAL_COLOR, NORMAL_BACK_COLOR, // normal
NORMAL_COLOR, DISABLED_BACK_COLOR, // disabled NORMAL_COLOR, DISABLED_BACK_COLOR, // disabled
MAKE_COLOR(0, 127, 0), // active COLOR_RED, // active
LIST_CID); LIST_CID);
listdef->v.list->scroll_bar = TRUE; listdef->v.list->scroll_bar = TRUE;
listdef->v.list->sizable_columns = TRUE; listdef->v.list->sizable_columns = TRUE;
@ -765,6 +765,10 @@ bool TSpreadsheet::on_key(KEY k)
#endif #endif
///////////////////////////////////////////////////////////
// Metodi di TSpreadsheet comuni a tutte le piattaforme
///////////////////////////////////////////////////////////
TMask& TSpreadsheet::mask() TMask& TSpreadsheet::mask()
{ {
TMask* m = (TMask*)get_app_data(parent()); TMask* m = (TMask*)get_app_data(parent());
@ -895,9 +899,12 @@ bool TSpreadsheet::notify(int n, KEY k)
// Certified 99% // Certified 99%
KEY TSpreadsheet::edit(int n) KEY TSpreadsheet::edit(int n)
{ {
const int olditems = items();
str2mask(n); str2mask(n);
notify(n, K_SPACE); // Notifica intenzione di modificare notify(n, K_SPACE); // Notifica intenzione di modificare
const KEY k = _mask.run(); const KEY k = _mask.run();
if (k == K_ENTER) if (k == K_ENTER)
{ {
mask2str(n); mask2str(n);
@ -910,7 +917,16 @@ KEY TSpreadsheet::edit(int n)
destroy(n); destroy(n);
str2mask(n); str2mask(n);
} }
} }
#if XVT_OS != XVT_OS_WIN
else
if (k == K_ESC)
{
if (items() > olditems)
destroy(n);
}
#endif
return k; return k;
} }

View File

@ -1 +1 @@
#define VERSION 1.12 #define VERSION 1.13