Patch level : 10.0
Files correlati : sc0.exe Ricompilazione Demo : [ ] Commento : Corretta gestione click al di fuori di qualsiasi nodo di un treeview o treelistview git-svn-id: svn://10.65.10.50/branches/R_10_00@22230 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5dd410a2ac
commit
c3a854aa9b
@ -706,7 +706,6 @@ TOperable_field* TSpreadsheet::col2field(int pos) const
|
||||
return good;
|
||||
}
|
||||
|
||||
|
||||
// Retrieves the corresponding field of the mask from a spredsheet cell
|
||||
TOperable_field* TSpreadsheet::cell2field(const XI_OBJ* cell) const
|
||||
{
|
||||
@ -2776,6 +2775,18 @@ TString_array& TSheet_field::rows_array() const
|
||||
return ((TSpreadsheet*)_ctl)->rows_array();
|
||||
}
|
||||
|
||||
const char* TSheet_field::cell(int r, int c) const
|
||||
{
|
||||
if (c >= FIRST_FIELD)
|
||||
c = cid2index(c);
|
||||
if (c < 0 || r < 0 || r >= items())
|
||||
return "";
|
||||
TToken_string& riga = ((TSheet_field*)this)->row(r);
|
||||
const char* v = riga.get(c);
|
||||
return v ? v : " ";
|
||||
}
|
||||
|
||||
|
||||
// Certified 100%
|
||||
// Ritorna l'indice della prima riga vuota dello sheet
|
||||
int TSheet_field::first_empty() const
|
||||
|
@ -148,8 +148,7 @@ public:
|
||||
// @cmember Ritorna un array con tutte le righe dello spreadsheet
|
||||
TString_array& rows_array() const;
|
||||
// @cmember Ritorna l'elemento <p c>-esimo della riga <p r>
|
||||
const char* cell(int r, int c)
|
||||
{ const char*v=row(r).get(c); return v ? v: " "; }
|
||||
const char* cell(int r, int c) const;
|
||||
|
||||
char separator() const { return _separator; }
|
||||
|
||||
|
@ -364,6 +364,16 @@ void TTree_window::set_tree(TTree* tree)
|
||||
void TTree_window::handle_tree_event(EVENT* ep)
|
||||
{
|
||||
XVT_TREEVIEW_NODE node = ep->v.ctl.ci.v.treeview.node;
|
||||
|
||||
if (node == NULL) // Click fuori da tutto
|
||||
{
|
||||
if (ep->v.ctl.ci.v.treeview.dbl_click)
|
||||
owner().on_key(K_F11); else
|
||||
if (ep->v.ctl.ci.v.treeview.sgl_click)
|
||||
owner().on_key(K_F8);
|
||||
return;
|
||||
}
|
||||
|
||||
const TString id = (const char*)xvt_treeview_get_node_data(_ctrl, node);
|
||||
if (_tree->goto_node(id))
|
||||
{
|
||||
@ -1356,6 +1366,16 @@ void TTreelist_window::create_children(XVT_TREEVIEW_NODE node)
|
||||
void TTreelist_window::handle_tree_event(EVENT* ep)
|
||||
{
|
||||
XVT_TREEVIEW_NODE node = ep->v.ctl.ci.v.treeview.node;
|
||||
|
||||
if (node == NULL) // Click fuori da tutto
|
||||
{
|
||||
if (ep->v.ctl.ci.v.treeview.dbl_click)
|
||||
owner().on_key(K_F11); else
|
||||
if (ep->v.ctl.ci.v.treeview.sgl_click)
|
||||
owner().on_key(K_F8);
|
||||
return;
|
||||
}
|
||||
|
||||
const TString id = (const char*)xvt_treelist_get_node_data(_ctrl, node);
|
||||
if (tree()->goto_node(id))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user