Focus rosso anche ai bottoni

git-svn-id: svn://10.65.10.50/trunk@338 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-10-10 09:49:34 +00:00
parent 1d0869e9a2
commit 6f9ed0cad2
2 changed files with 24 additions and 12 deletions

View File

@ -238,7 +238,6 @@ long TControl::handler(WINDOW win, EVENT* ep)
cc->mouse_up(); cc->mouse_up();
break; break;
default: default:
// dispatch_event(get_parent(win), ep);
dispatch_e_char(get_parent(win), key); dispatch_e_char(get_parent(win), key);
break; break;
} }
@ -633,6 +632,7 @@ void TPush_button::update() const
draw_pressed(FALSE); draw_pressed(FALSE);
if (focused() && id() != DLG_F9) if (focused() && id() != DLG_F9)
{ {
/*
HWND hwnd = (HWND)get_value(_hdc, ATTR_NATIVE_WINDOW); HWND hwnd = (HWND)get_value(_hdc, ATTR_NATIVE_WINDOW);
HDC hdc = GetDC(hwnd); HDC hdc = GetDC(hwnd);
RECT r; RECT r;
@ -642,6 +642,16 @@ void TPush_button::update() const
r.bottom = _client.bottom-DEPTH; r.bottom = _client.bottom-DEPTH;
DrawFocusRect(hdc, &r); DrawFocusRect(hdc, &r);
ReleaseDC(hwnd, hdc); ReleaseDC(hwnd, hdc);
*/
CPEN pen;
pen.width = 1;
pen.pat = PAT_SOLID;
pen.style = P_SOLID;
pen.color = COLOR_RED;
win_set_cpen(_hdc, &pen);
CBRUSH brush = { PAT_HOLLOW, COLOR_WHITE };
win_set_cbrush(_hdc, &brush);
win_draw_rect(_hdc, &_client);
} else } else
if (disabled() && _picup) if (disabled() && _picup)
{ {

View File

@ -471,6 +471,7 @@ if (xiev->v.xi_obj->type == XIT_LIST)
update_rec(_cur_row); update_rec(_cur_row);
_row_dirty = TRUE; _row_dirty = TRUE;
} }
if (!cell_disabled(_cur_row, _cur_col))
set_focus_cell(_cur_row, _cur_col); set_focus_cell(_cur_row, _cur_col);
_check_enabled = TRUE; _check_enabled = TRUE;
} }
@ -604,6 +605,7 @@ break;
case K_F3: case K_F3:
case K_F8: case K_F8:
case K_F9: case K_F9:
case K_F11:
{ {
_check_enabled = FALSE; // Disable checks _check_enabled = FALSE; // Disable checks
if (!_row_dirty) notify(_cur_row, K_SPACE); if (!_row_dirty) notify(_cur_row, K_SPACE);