Modifica 95/23
Implementato meccanismo per aprire la maschera degli sheet con un tasto git-svn-id: svn://10.65.10.50/trunk@1769 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
bf76c36172
commit
f8b0972f7d
@ -8,6 +8,7 @@ const short FIRST_FIELD = 101;
|
|||||||
|
|
||||||
#include <xil.h>
|
#include <xil.h>
|
||||||
#include <colors.h>
|
#include <colors.h>
|
||||||
|
#include <keys.h>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TSpreadsheet
|
// TSpreadsheet
|
||||||
@ -633,7 +634,10 @@ void TSpreadsheet::list_handler(XI_EVENT *xiev)
|
|||||||
_check_enabled = FALSE;
|
_check_enabled = FALSE;
|
||||||
|
|
||||||
const int oldrec = _cur_rec;
|
const int oldrec = _cur_rec;
|
||||||
set_pos(xiev->v.xi_obj->v.cell.row, xiev->v.xi_obj->v.cell.column);
|
if ( xiev->v.xi_obj != NULL )
|
||||||
|
{
|
||||||
|
set_pos(xiev->v.xi_obj->v.cell.row, xiev->v.xi_obj->v.cell.column);
|
||||||
|
};
|
||||||
|
|
||||||
if (oldrec != _cur_rec || !_row_dirty)
|
if (oldrec != _cur_rec || !_row_dirty)
|
||||||
{
|
{
|
||||||
@ -774,6 +778,11 @@ void TSpreadsheet::list_handler(XI_EVENT *xiev)
|
|||||||
const KEY k = e_char_to_key(ep);
|
const KEY k = e_char_to_key(ep);
|
||||||
switch(k)
|
switch(k)
|
||||||
{
|
{
|
||||||
|
case K_ROWEDIT:
|
||||||
|
xiev->type = XIE_DBL_CELL;
|
||||||
|
xiev->v.xi_obj = NULL;
|
||||||
|
list_handler( xiev );
|
||||||
|
break;
|
||||||
case K_TAB:
|
case K_TAB:
|
||||||
case K_BTAB:
|
case K_BTAB:
|
||||||
_lastab = k;
|
_lastab = k;
|
||||||
@ -1618,7 +1627,19 @@ bool TSheet_field::on_key(KEY k)
|
|||||||
{
|
{
|
||||||
if (!test_focus_change())
|
if (!test_focus_change())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
};
|
||||||
|
if (k == K_ROWEDIT )
|
||||||
|
{
|
||||||
|
if ( items( ) )
|
||||||
|
{
|
||||||
|
_sheet->select( _sheet->items( ) - 1 );
|
||||||
|
XI_EVENT xie;
|
||||||
|
xie.type = XIE_DBL_CELL;
|
||||||
|
xie.v.xi_obj = NULL;
|
||||||
|
_sheet->list_handler( &xie );
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
};
|
||||||
return TMask_field::on_key(k);
|
return TMask_field::on_key(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define K_ROWEDIT ( K_CTRL + 'I' )
|
||||||
|
|
||||||
class TSheet_field;
|
class TSheet_field;
|
||||||
class TSpreadsheet;
|
class TSpreadsheet;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user