diff --git a/include/mask.cpp b/include/mask.cpp index 5672aa53f..3a3943768 100755 --- a/include/mask.cpp +++ b/include/mask.cpp @@ -188,8 +188,8 @@ void TMask::init_mask(int mode) { _sheets = _pages = 0; // Azzera numero pagine e sheets _enabled = 0xffff; // Abilita tutte le pagine - _focus = _first_focus = 0; // Nessuna ha il focus - _page = -1; // Nessuan pagina corrente + _focus = _first_focus = 0; // Nessuno ha il focus + _page = -1; // Nessuna pagina corrente _handler = NULL; // Nessun handler utente _mode = mode; // Inizializza modo _exchange = 1.0; // Il cambio per la valuta e' la lira @@ -319,11 +319,14 @@ void TMask::open() if (!_open || _page != 0) { _open = TRUE; + if (toolwin()) + show_window(toolwin(), TRUE); + set_front_window(fld(0).win()); // TBR next_page(0); - if (toolwin()) show_window(toolwin(), TRUE); } else { + set_front_window(fld(0).win()); // TBR set_focus(); } } diff --git a/include/msksheet.cpp b/include/msksheet.cpp index 5bc77c995..0d5980262 100755 --- a/include/msksheet.cpp +++ b/include/msksheet.cpp @@ -182,8 +182,8 @@ TSpreadsheet::TSpreadsheet(short x, short y, short dx, short dy, COLOR_RED, // active LIST_CID); listdef->v.list->scroll_bar = TRUE; - listdef->v.list->sizable_columns = TRUE; - listdef->v.list->movable_columns = TRUE; + listdef->v.list->sizable_columns = FALSE; + listdef->v.list->movable_columns = FALSE; listdef->v.list->scroll_bar_button = TRUE; listdef->v.list->fixed_columns = 1; listdef->v.list->width = rct.right-rct.left; @@ -354,7 +354,6 @@ void TSpreadsheet::update(int row) { xi_cell_request(_list); // Force updatde xi_scroll(_list, XI_SCROLL_FIRST); - set_front_window(win()); // Seems necessary } else update_rec(row); diff --git a/include/sheet.cpp b/include/sheet.cpp index ae5c2f7e2..ba3fd9f8d 100755 --- a/include/sheet.cpp +++ b/include/sheet.cpp @@ -562,6 +562,13 @@ long TArray_sheet::add(const TToken_string& s) return n; } +long TArray_sheet::add(TToken_string* s) +{ + const long n = _data.add(s, -1); + set_scroll_max(-1, n); + return n; +} + long TArray_sheet::insert(const TToken_string& s, long n) { _data.insert(s, (int)n); diff --git a/include/sheet.h b/include/sheet.h index f774ef1c1..f22563e34 100755 --- a/include/sheet.h +++ b/include/sheet.h @@ -115,6 +115,7 @@ public: const char* head, byte buttons = 0, WINDOW parent = NULL_WIN); virtual long items() const { return _data.items(); } long add(const TToken_string& s); + long add(TToken_string* s); long insert(const TToken_string& s, long n); virtual TToken_string& row(long s = -1) { return (s < 0) ? data(selected()) : data(s); } bool destroy(int i = -1) { uncheck(-1); return _data.destroy(i, TRUE); } diff --git a/include/xvtility.cpp b/include/xvtility.cpp index 42f25b578..fa66b59e8 100755 --- a/include/xvtility.cpp +++ b/include/xvtility.cpp @@ -78,8 +78,8 @@ HIDDEN LOGFONT NormalLogFont = OUT_TT_PRECIS, CLIP_STROKE_PRECIS, PROOF_QUALITY, - FIXED_PITCH | FF_ROMAN, - (LPSTR)"Times New Roman" + FIXED_PITCH | FF_SYSTEM, + (LPSTR)"Courier New" }; HIDDEN HFONT NormalFont = CreateFontIndirect(&NormalLogFont);