In corso di soluzione il problema del focus degli sheet

git-svn-id: svn://10.65.10.50/trunk@362 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-10-13 08:04:42 +00:00
parent f29414712e
commit 6c6f250fd6
5 changed files with 18 additions and 8 deletions

View File

@ -188,8 +188,8 @@ void TMask::init_mask(int mode)
{ {
_sheets = _pages = 0; // Azzera numero pagine e sheets _sheets = _pages = 0; // Azzera numero pagine e sheets
_enabled = 0xffff; // Abilita tutte le pagine _enabled = 0xffff; // Abilita tutte le pagine
_focus = _first_focus = 0; // Nessuna ha il focus _focus = _first_focus = 0; // Nessuno ha il focus
_page = -1; // Nessuan pagina corrente _page = -1; // Nessuna pagina corrente
_handler = NULL; // Nessun handler utente _handler = NULL; // Nessun handler utente
_mode = mode; // Inizializza modo _mode = mode; // Inizializza modo
_exchange = 1.0; // Il cambio per la valuta e' la lira _exchange = 1.0; // Il cambio per la valuta e' la lira
@ -319,11 +319,14 @@ void TMask::open()
if (!_open || _page != 0) if (!_open || _page != 0)
{ {
_open = TRUE; _open = TRUE;
if (toolwin())
show_window(toolwin(), TRUE);
set_front_window(fld(0).win()); // TBR
next_page(0); next_page(0);
if (toolwin()) show_window(toolwin(), TRUE);
} }
else else
{ {
set_front_window(fld(0).win()); // TBR
set_focus(); set_focus();
} }
} }

View File

@ -182,8 +182,8 @@ TSpreadsheet::TSpreadsheet(short x, short y, short dx, short dy,
COLOR_RED, // 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 = FALSE;
listdef->v.list->movable_columns = TRUE; listdef->v.list->movable_columns = FALSE;
listdef->v.list->scroll_bar_button = TRUE; listdef->v.list->scroll_bar_button = TRUE;
listdef->v.list->fixed_columns = 1; listdef->v.list->fixed_columns = 1;
listdef->v.list->width = rct.right-rct.left; listdef->v.list->width = rct.right-rct.left;
@ -354,7 +354,6 @@ void TSpreadsheet::update(int row)
{ {
xi_cell_request(_list); // Force updatde xi_cell_request(_list); // Force updatde
xi_scroll(_list, XI_SCROLL_FIRST); xi_scroll(_list, XI_SCROLL_FIRST);
set_front_window(win()); // Seems necessary
} }
else else
update_rec(row); update_rec(row);

View File

@ -562,6 +562,13 @@ long TArray_sheet::add(const TToken_string& s)
return n; 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) long TArray_sheet::insert(const TToken_string& s, long n)
{ {
_data.insert(s, (int)n); _data.insert(s, (int)n);

View File

@ -115,6 +115,7 @@ public:
const char* head, byte buttons = 0, WINDOW parent = NULL_WIN); const char* head, byte buttons = 0, WINDOW parent = NULL_WIN);
virtual long items() const { return _data.items(); } virtual long items() const { return _data.items(); }
long add(const TToken_string& s); long add(const TToken_string& s);
long add(TToken_string* s);
long insert(const TToken_string& s, long n); long insert(const TToken_string& s, long n);
virtual TToken_string& row(long s = -1) { return (s < 0) ? data(selected()) : data(s); } 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); } bool destroy(int i = -1) { uncheck(-1); return _data.destroy(i, TRUE); }

View File

@ -78,8 +78,8 @@ HIDDEN LOGFONT NormalLogFont =
OUT_TT_PRECIS, OUT_TT_PRECIS,
CLIP_STROKE_PRECIS, CLIP_STROKE_PRECIS,
PROOF_QUALITY, PROOF_QUALITY,
FIXED_PITCH | FF_ROMAN, FIXED_PITCH | FF_SYSTEM,
(LPSTR)"Times New Roman" (LPSTR)"Courier New"
}; };
HIDDEN HFONT NormalFont = CreateFontIndirect(&NormalLogFont); HIDDEN HFONT NormalFont = CreateFontIndirect(&NormalLogFont);