controls.cpp Evitato il cambio del focus nei bottoni Fine ed Annulla

maskfld.h       Corretti commenti errati
msksheet.cpp    Potenziato il metodo set_back_and_fore_colors


git-svn-id: svn://10.65.10.50/trunk@4375 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1997-05-22 14:16:28 +00:00
parent a07348f10e
commit f83915d3a7
3 changed files with 40 additions and 19 deletions

View File

@ -1324,18 +1324,24 @@ bool TButton_control::event_handler(XI_OBJ* itf, XI_EVENT* xiev)
if (xiev->type == XIE_BUTTON)
{
if (_last_mouse_button == 0 && xi_move_focus(_obj))
{
switch (_obj->v.btn->type)
if (_last_mouse_button == 0)
{
if (id() != DLG_CANCEL && id() != DLG_QUIT)
ok = xi_move_focus(_obj) ? TRUE : FALSE;
if (ok)
{
case XIBT_CHECKBOX:
case XIBT_BUTTON_CHECKBOX:
toggle();
break;
default:
break;
switch (_obj->v.btn->type)
{
case XIBT_CHECKBOX:
case XIBT_BUTTON_CHECKBOX:
toggle();
break;
default:
break;
}
ok = notify_key(K_SPACE);
}
ok = notify_key(K_SPACE);
}
}
else

View File

@ -789,9 +789,9 @@ class TBrowse : public TBrowse_button
// @cmember:(INTERNAL) Indica se sul campo e' gia' stato effettuato il check
bool _checked;
// @cmember:(INTERNAL) Testata della maschera di ricerca
// @cmember:(INTERNAL) Testate della maschera di ricerca
TToken_string _head;
// @cmember:(INTERNAL) Item della maschera di ricerca
// @cmember:(INTERNAL) Campi visualizzati dalla maschera di ricerca
TToken_string _items;
// @cmember:(INTERNAL) Campi di input sulla maschera
TToken_string _inp_id;

View File

@ -705,7 +705,7 @@ int TSpreadsheet::insert(
TToken_string* toktok = new TToken_string(80);
r = _str.insert(toktok, rec);
_property.insert(NULL, r);
_property.insert(NULL, r, TRUE); // Crea lo spazio necessario per le proprieta'
// Notifica che l'inserimento e' terminato
owner().post_insert(r);
@ -1668,12 +1668,27 @@ void TSpreadsheet::enable_cell(
}
void TSpreadsheet::set_back_and_fore_color(COLOR back, COLOR fore, int row)
{
TRow_property* prop = get_property(row, TRUE);
if (back != COLOR_INVALID)
prop->_back = back;
if (fore != COLOR_INVALID)
prop->_fore = fore;
{
if (back != COLOR_INVALID || fore != COLOR_INVALID)
{
int first = 0;
int last = items()-1;
if (row > 0)
first = last = row;
const bool crea = back != NORMAL_BACK_COLOR || fore != NORMAL_COLOR;
for (int r = first; r <= last; r++)
{
TRow_property* prop = get_property(r, crea);
if (prop)
{
if (back != COLOR_INVALID)
prop->_back = back;
if (fore != COLOR_INVALID)
prop->_fore = fore;
}
}
}
}
void TSpreadsheet::get_back_and_fore_color(COLOR& back, COLOR& fore, int row)