2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
// Name: DBGrid.cpp
|
|
|
|
// Purpose: wxGrid sample
|
|
|
|
// Author: Mark Johnson
|
|
|
|
// Modified by: 19990929.mj10777 a reuseable DBGrid
|
|
|
|
// Created: 19990929
|
|
|
|
// Copyright: (c)
|
|
|
|
// Licence: wxWindows license
|
2000-01-31 13:20:36 +00:00
|
|
|
// RCS-ID: $Id$
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
|
|
|
//-- all #ifdefs that the whole Project needs. -------------------------------------------
|
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
// For compilers that support precompilation, includes "wx/wx.h".
|
|
|
|
#include "wx/wxprec.h"
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
#ifdef __BORLANDC__
|
|
|
|
#pragma hdrstop
|
|
|
|
#endif
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
#ifndef WX_PRECOMP
|
|
|
|
#include "wx/wx.h"
|
|
|
|
#endif
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
|
|
|
//-- all #includes that every .cpp needs --- 19990807.mj10777 ----------------
|
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
#include "std.h" // sorgsam Pflegen !
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
BEGIN_EVENT_TABLE(DBGrid, wxGrid)
|
2000-02-12 14:11:17 +00:00
|
|
|
EVT_MOTION (DBGrid::OnMouseMove)
|
|
|
|
// DBGrid
|
|
|
|
EVT_GRID_LABEL_LEFT_CLICK( DBGrid::OnLabelLeftClick )
|
|
|
|
EVT_GRID_LABEL_RIGHT_CLICK( DBGrid::OnLabelRightClick )
|
|
|
|
EVT_GRID_LABEL_LEFT_DCLICK( DBGrid::OnLabelLeftDClick )
|
|
|
|
EVT_GRID_LABEL_RIGHT_DCLICK( DBGrid::OnLabelRightDClick )
|
|
|
|
EVT_GRID_CELL_LEFT_CLICK( DBGrid::OnCellLeftClick )
|
|
|
|
EVT_GRID_CELL_RIGHT_CLICK( DBGrid::OnCellRightClick )
|
|
|
|
EVT_GRID_CELL_LEFT_DCLICK( DBGrid::OnCellLeftDClick )
|
|
|
|
EVT_GRID_CELL_RIGHT_DCLICK( DBGrid::OnCellRightDClick )
|
|
|
|
EVT_GRID_ROW_SIZE( DBGrid::OnRowSize )
|
|
|
|
// EVT_GRID_COL_SIZE( DBGrid::OnColSize )
|
|
|
|
EVT_GRID_RANGE_SELECT( DBGrid::OnRangeSelected )
|
|
|
|
EVT_GRID_CELL_CHANGE( DBGrid::OnCellChange )
|
|
|
|
EVT_MENU(GRID_EDIT,DBGrid::OnModusEdit)
|
|
|
|
EVT_MENU(GRID_BROWSE,DBGrid::OnModusBrowse)
|
|
|
|
END_EVENT_TABLE()
|
|
|
|
//----------------------------------------------------------------------------------------
|
|
|
|
// wxListCtrl(parent, id, pos, size, style)
|
|
|
|
// wxGrid(parent,-1,wxPoint( 0, 0 ), wxSize( 400, 300 ) );
|
|
|
|
//----------------------------------------------------------------------------------------
|
|
|
|
// DBGrid
|
|
|
|
//----------------------------------------------------------------------------------------
|
|
|
|
// DBGrid::DBGrid(wxWindow *parent, const wxWindowID id,const wxPoint& pos,const wxSize& size):
|
|
|
|
// wxGrid(parent, id, pos, size)
|
|
|
|
DBGrid::DBGrid(wxWindow *parent, const wxWindowID id,const wxPoint& pos,const wxSize& size, long style):
|
|
|
|
wxGrid(parent, id, pos, size, style)
|
2000-01-28 15:25:32 +00:00
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
b_EditModus = TRUE;
|
|
|
|
//---------------------------------------------------------------------------------------
|
|
|
|
popupMenu1 = new wxMenu("");
|
|
|
|
popupMenu1->Append(GRID_EDIT, _("Edit Modus"));
|
|
|
|
popupMenu2 = new wxMenu("");
|
|
|
|
popupMenu2->Append(GRID_BROWSE, _("Browse Modus"));
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
DBGrid::~DBGrid()
|
|
|
|
{
|
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
int DBGrid::OnTableView(wxString Table)
|
|
|
|
{
|
2000-02-14 11:05:14 +00:00
|
|
|
wxStopWatch sw;
|
2000-02-12 14:11:17 +00:00
|
|
|
//---------------------------------------------------------------------------------------
|
2000-02-10 15:36:10 +00:00
|
|
|
int i=0,x,y,z, ValidTable=0;
|
|
|
|
wxString Temp0;
|
|
|
|
wxBeginBusyCursor();
|
2000-02-12 14:11:17 +00:00
|
|
|
SetFont(* pDoc->ft_Doc);
|
|
|
|
//---------------------------------------------------------------------------------------
|
2000-02-10 15:36:10 +00:00
|
|
|
ct_BrowserDB = (db_Br+i_Which)->ct_BrowserDB; // Get the DSN Pointer
|
2000-02-12 14:11:17 +00:00
|
|
|
//---------------------------------------------------------------------------------------
|
2000-02-10 15:36:10 +00:00
|
|
|
if (ct_BrowserDB) // Valid pointer (!= NULL) ?
|
|
|
|
{ // Pointer is Valid, use the wxDatabase Information
|
|
|
|
for (x=0;x<ct_BrowserDB->numTables;x++) // go through the Tables
|
|
|
|
{
|
|
|
|
if (!wxStrcmp((ct_BrowserDB->pTableInf+x)->tableName,Table)) // is this our Table ?
|
|
|
|
{ // Yes, the Data of this Table shall be put into the Grid
|
|
|
|
ValidTable = x; // Save the Tablenumber
|
|
|
|
(db_Br+i_Which)->OnSelect(Table,FALSE); // Select * from "table"
|
|
|
|
// Set the local Pointer to the Column Information we are going to use
|
|
|
|
(db_Br+i_Which)->cl_BrowserDB = (ct_BrowserDB->pTableInf+x)->pColInf;
|
|
|
|
if ((ct_BrowserDB->pTableInf+x)->pColInf) // Valid pointer (!= NULL) ?
|
|
|
|
{ // Pointer is Valid, Column Informationen sind Vorhanden
|
|
|
|
i = (db_Br+i_Which)->i_Records; // How many Records are there
|
|
|
|
(db_Br+i_Which)->i_Which = ValidTable; // Still used ???? mj10777
|
|
|
|
if (i == 0) // If the Table is empty, then show one empty row
|
|
|
|
i++;
|
2000-02-21 12:31:07 +00:00
|
|
|
// wxLogMessage(_("\n-I-> DBGrid::OnTableView() : Vor CreateGrid"));
|
2000-02-10 15:36:10 +00:00
|
|
|
CreateGrid(i,(ct_BrowserDB->pTableInf+x)->numCols); // Records , Columns
|
|
|
|
for (y=0;y<(ct_BrowserDB->pTableInf+x)->numCols;y++) // Loop through the Fields
|
|
|
|
{ // The Field / Column name is used here as Row Titel
|
|
|
|
SetColLabelValue(y,((ct_BrowserDB->pTableInf+x)->pColInf+y)->colName);
|
|
|
|
SetColSize(y,95);
|
|
|
|
} // for (y=0;y<(ct_BrowserDB->pTableInf+x)->numCols;y++)
|
|
|
|
SetColSize(((ct_BrowserDB->pTableInf+x)->numCols-1),120); // Make the last Column Wider
|
|
|
|
// The Grid has been created, now fill it
|
|
|
|
for (z=0;z<(db_Br+i_Which)->i_Records;z++) // Loop through the Records
|
|
|
|
{
|
|
|
|
Temp0.Printf("%06d",z+1); SetRowLabelValue(z,Temp0); // Set Row Lable Value
|
|
|
|
(db_Br+i_Which)->OnGetNext((ct_BrowserDB->pTableInf+ValidTable)->numCols,FALSE);
|
|
|
|
for (y=0;y<(ct_BrowserDB->pTableInf+ValidTable)->numCols;y++) // Loop through the Fields
|
|
|
|
{ // BrowserDB::OnGetNext Formats the field Value into tablename
|
|
|
|
SetCellValue(z, y,((db_Br+i_Which)->cl_BrowserDB+y)->tableName);
|
|
|
|
}
|
|
|
|
if (z % 50 == 0)
|
|
|
|
{
|
|
|
|
Temp0.Printf(_("-I-> DBGrid::OnTableView(%s) - Record %6d has been read."),Table.c_str(),z);
|
|
|
|
pDoc->p_MainFrame->SetStatusText(Temp0, 0);
|
|
|
|
}
|
|
|
|
} // for (z=0;z<(db_Br+i_Which)->i_Records;z++)
|
2000-02-14 11:05:14 +00:00
|
|
|
Temp0.Printf(_("-I-> DBGrid::OnTableView(%s) - %6d Records have been read. - Time needed : %ld ms"),Table.c_str(),z,sw.Time());
|
|
|
|
wxLogMessage(Temp0);
|
2000-02-10 15:36:10 +00:00
|
|
|
pDoc->p_MainFrame->SetStatusText(Temp0, 0);
|
|
|
|
// The Grid has been filled, now leave
|
|
|
|
goto Weiter;
|
|
|
|
} // if ((ct_BrowserDB->pTableInf+x)->pColInf)
|
|
|
|
else
|
2000-02-21 12:31:07 +00:00
|
|
|
wxLogMessage(_("\n-E-> DBGrid::OnTableView() : Invalid Column Pointer : Failed"));
|
2000-02-10 15:36:10 +00:00
|
|
|
} // if ((ct_BrowserDB->pTableInf+x)->tableType == "TABLE")
|
|
|
|
} // for (x=0;x<ct_BrowserDB->numTables;x++)
|
|
|
|
} // if (ct_BrowserDB)
|
|
|
|
else
|
2000-02-21 12:31:07 +00:00
|
|
|
wxLogMessage(_("\n-E-> DBGrid::OnTableView() : Invalid DSN Pointer : Failed"));
|
2000-02-12 14:11:17 +00:00
|
|
|
//---------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
Weiter:
|
2000-02-12 14:11:17 +00:00
|
|
|
SetEditInPlace(b_EditModus); // Activate in-place Editing (FALSE)
|
|
|
|
wxEndBusyCursor();
|
|
|
|
//---------------------------------------------------------------------------------------
|
|
|
|
wxLogMessage(_("-I-> DBGrid::OnTableView() - End"));
|
|
|
|
return 0;
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnModusEdit(wxMenu& menu, wxCommandEvent& event)
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
b_EditModus = TRUE; // Needed by PopupMenu
|
|
|
|
SetEditable(FALSE); // Do not Edit with Text Edit Control
|
|
|
|
SetEditInPlace(b_EditModus); // Deactivate in-place Editing
|
|
|
|
UpdateDimensions(); // Redraw the Grid
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnModusBrowse(wxMenu& menu, wxCommandEvent& event)
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
b_EditModus = FALSE; // Needed by PopupMenu
|
|
|
|
SetEditInPlace(b_EditModus); // Deactivate in-place Editing
|
|
|
|
UpdateDimensions(); // Redraw the Grid
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnMouseMove(wxMouseEvent &event)
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
MousePos = event.GetPosition();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnLabelLeftClick( wxGridEvent& ev )
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
logBuf = "DBGrid::OnLabelLeftClick : ";
|
|
|
|
if ( ev.GetRow() != -1 )
|
|
|
|
{
|
|
|
|
logBuf << "row label " << ev.GetRow();
|
|
|
|
}
|
|
|
|
else if ( ev.GetCol() != -1 )
|
|
|
|
{
|
|
|
|
logBuf << "col label " << ev.GetCol();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
logBuf << "corner label";
|
|
|
|
}
|
|
|
|
if ( ev.ShiftDown() )
|
|
|
|
logBuf << " (shift down)";
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
logBuf += "\n";
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnLabelRightClick( wxGridEvent& ev )
|
|
|
|
{
|
|
|
|
//-------------------
|
2000-02-12 14:11:17 +00:00
|
|
|
if (b_EditModus)
|
|
|
|
PopupMenu(popupMenu2,MousePos.x,MousePos.y);
|
|
|
|
else
|
|
|
|
PopupMenu(popupMenu1,MousePos.x,MousePos.y);
|
|
|
|
//-------------------
|
|
|
|
logBuf = "DBGrid::OnLabelRightClick : ";
|
|
|
|
if ( ev.GetRow() != -1 )
|
|
|
|
{
|
|
|
|
logBuf << "row label " << ev.GetRow();
|
|
|
|
}
|
|
|
|
else if ( ev.GetCol() != -1 )
|
|
|
|
{
|
|
|
|
logBuf << "col label " << ev.GetCol();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
logBuf << "corner label";
|
|
|
|
}
|
|
|
|
if ( ev.ShiftDown() )
|
|
|
|
logBuf << " (shift down)";
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
logBuf += "\n";
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnLabelLeftDClick( wxGridEvent& ev )
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
logBuf = "DBGrid::OnLabelLeftDClick : ";
|
|
|
|
if ( ev.GetRow() != -1 )
|
|
|
|
{
|
|
|
|
logBuf << "row label " << ev.GetRow();
|
|
|
|
}
|
|
|
|
else if ( ev.GetCol() != -1 )
|
|
|
|
{
|
|
|
|
logBuf << "col label " << ev.GetCol();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
logBuf << "corner label";
|
|
|
|
}
|
|
|
|
if ( ev.ShiftDown() )
|
|
|
|
logBuf << " (shift down)";
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
logBuf += "\n";
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnLabelRightDClick( wxGridEvent& ev )
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
logBuf = "DBGrid::OnLabelRightDClick : ";
|
|
|
|
if ( ev.GetRow() != -1 )
|
|
|
|
{
|
|
|
|
logBuf << "row label " << ev.GetRow();
|
|
|
|
}
|
|
|
|
else if ( ev.GetCol() != -1 )
|
|
|
|
{
|
|
|
|
logBuf << "col label " << ev.GetCol();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
logBuf << "corner label";
|
|
|
|
}
|
|
|
|
if ( ev.ShiftDown() )
|
|
|
|
logBuf << " (shift down)";
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
logBuf += "\n";
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnCellLeftClick( wxGridEvent& ev )
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
logBuf = "DBGrid::OnCellLeftClick : ";
|
|
|
|
logBuf << "Cell at row " << ev.GetRow()
|
|
|
|
<< " col " << ev.GetCol();
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
// wxMessageBox(logBuf);
|
|
|
|
logBuf += "\n";
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
// you must call event skip if you want default grid processing
|
|
|
|
// (cell highlighting etc.)
|
|
|
|
//
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnCellRightClick( wxGridEvent& ev )
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
logBuf = "DBGrid::OnCellRightClick : ";
|
|
|
|
logBuf << "Cell at row " << ev.GetRow()
|
|
|
|
<< " col " << ev.GetCol();
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
// wxMessageBox(logBuf);
|
|
|
|
logBuf += "\n";
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
// you must call event skip if you want default grid processing
|
|
|
|
// (cell highlighting etc.)
|
|
|
|
//
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnCellLeftDClick( wxGridEvent& ev )
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
logBuf = "DBGrid::OnCellLeftDClick : ";
|
|
|
|
logBuf << "Cell at row " << ev.GetRow()
|
|
|
|
<< " col " << ev.GetCol();
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
// wxMessageBox(logBuf);
|
|
|
|
logBuf += "\n";
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
// you must call event skip if you want default grid processing
|
|
|
|
// (cell highlighting etc.)
|
|
|
|
//
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnCellRightDClick( wxGridEvent& ev )
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
logBuf = "DBGrid::OnCellRightDClick : ";
|
|
|
|
logBuf << "Cell at row " << ev.GetRow()
|
|
|
|
<< " col " << ev.GetCol();
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
// wxMessageBox(logBuf);
|
|
|
|
logBuf += "\n";
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
// you must call event skip if you want default grid processing
|
|
|
|
// (cell highlighting etc.)
|
|
|
|
//
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnCellChange( wxGridEvent& ev )
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
logBuf = "DBGrid::OnCellChange : ";
|
|
|
|
logBuf << "Cell at row " << ev.GetRow()
|
|
|
|
<< " col " << ev.GetCol();
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
// wxMessageBox(logBuf);
|
|
|
|
logBuf += "\n";
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
// you must call event skip if you want default grid processing
|
|
|
|
// (cell highlighting etc.)
|
|
|
|
//
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnRowSize( wxGridSizeEvent& ev )
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
logBuf = "DBGrid::OnRowSize : ";
|
|
|
|
logBuf << "Resized row " << ev.GetRowOrCol();
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
logBuf += "\n";
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnColSize( wxGridSizeEvent& ev )
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
logBuf = "DBGrid::OnColSize : ";
|
|
|
|
logBuf << "Resized col " << ev.GetRowOrCol();
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
logBuf += "\n";
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|
2000-01-28 15:25:32 +00:00
|
|
|
void DBGrid::OnRangeSelected( wxGridRangeSelectEvent& ev )
|
|
|
|
{
|
2000-02-12 14:11:17 +00:00
|
|
|
logBuf = "DBGrid::OnRangeSelected : ";
|
|
|
|
logBuf << "Selected cells from row " << ev.GetTopRow()
|
|
|
|
<< " col " << ev.GetLeftCol()
|
|
|
|
<< " to row " << ev.GetBottomRow()
|
|
|
|
<< " col " << ev.GetRightCol();
|
|
|
|
logBuf += "\n";
|
|
|
|
// wxLogMessage( "%s", logBuf.c_str() );
|
|
|
|
wxLogMessage(logBuf.c_str());
|
|
|
|
ev.Skip();
|
2000-01-28 15:25:32 +00:00
|
|
|
}
|
2000-02-12 14:11:17 +00:00
|
|
|
//----------------------------------------------------------------------------------------
|