本文整理汇总了C++中wxGridEvent::GetCol方法的典型用法代码示例。如果您正苦于以下问题:C++ wxGridEvent::GetCol方法的具体用法?C++ wxGridEvent::GetCol怎么用?C++ wxGridEvent::GetCol使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxGridEvent
的用法示例。
在下文中一共展示了wxGridEvent::GetCol方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnCellBeginDrag
void GridFrame::OnCellBeginDrag( wxGridEvent& ev )
{
logBuf = wxEmptyString;
logBuf << _T("Got request to drag cell at")
<< _T(" row ") << ev.GetRow()
<< _T(" col ") << ev.GetCol();
wxLogMessage( wxT("%s"), logBuf.c_str() );
ev.Skip();
}
示例2: OnCellDClick
void BreakpointsWnd::OnCellDClick(wxGridEvent& evt)
{
int r = evt.GetRow();
int c = evt.GetCol();
if (c != 0 && r <= gWorkspace->getBreakpointCount())
{
auto b = gWorkspace->getBreakpoint(r);
gFileEditorGroupWnd->gotoFile(b->file, b->line);
}
evt.Skip();
}
示例3: OnCellValueChanged
void GridFrame::OnCellValueChanged( wxGridEvent& ev )
{
logBuf = wxEmptyString;
logBuf << _T("Value changed for cell at")
<< _T(" row ") << ev.GetRow()
<< _T(" col ") << ev.GetCol();
wxLogMessage( wxT("%s"), logBuf.c_str() );
ev.Skip();
}
示例4: OnCellLeftClick
void GridFrame::OnCellLeftClick( wxGridEvent& ev )
{
logBuf = wxEmptyString;
logBuf << _T("Left click at row ") << ev.GetRow()
<< _T(" col ") << ev.GetCol();
wxLogMessage( wxT("%s"), logBuf.c_str() );
// you must call event skip if you want default grid processing
// (cell highlighting etc.)
//
ev.Skip();
}
示例5: OnChannelMapGridCellLeftDClick
void LMSImportChannelMapDialog::OnChannelMapGridCellLeftDClick(wxGridEvent& event)
{
if (event.GetCol() == 4) {
wxColor c = ChannelMapGrid->GetCellBackgroundColour(event.GetRow(), 4);
wxColourData data;
data.SetColour(c);
wxColourDialog dlg(this, &data);
dlg.ShowModal();
ChannelMapGrid->SetCellBackgroundColour(event.GetRow(), 4, dlg.GetColourData().GetColour());
ChannelMapGrid->Refresh();
}
}
示例6: OnInfluenceCellChanged
void FDPPanel::OnInfluenceCellChanged(wxGridEvent& event)
{
wxGrid* pGrid = (wxGrid*)wxWindow::FindWindowById(ID_INFLUENCE_GRID, this);
wxString data = pGrid->GetCellValue(event.GetRow(), event.GetCol());
wxString func = pGrid->GetCellValue(event.GetRow(), 0);
double w;
pGrid->GetCellValue(event.GetRow(), 1).ToDouble(&w);
long fap;
pGrid->GetCellValue(event.GetRow(), 2).ToLong(&fap);
switch(event.GetCol())
{
case 1:
if(!data.ToDouble(&w))
{
wxLogMessage(_T("Weight value should be a number! But it is %s"), data);
pGrid->SetCellValue(event.GetRow(), event.GetCol(), _T("0"));
w = 0;
}
break;
case 2:
if(data.ToLong(&fap))
{
if(fap > 68 || fap < 1)
{
wxLogMessage(_T("FAP Id value should be a number between 1-68! But it is %s"), data);
pGrid->SetCellValue(event.GetRow(), event.GetCol(), _T("0"));
fap = 0;
}
}
else
{
pGrid->SetCellValue(event.GetRow(), event.GetCol(), _T("0"));
fap = 0;
}
break;
}
if( (func != wxEmptyString) && (fap > 0)/* && (w != 0)*/ )
Mediator::getInstance()->onModifyInfluence(event.GetRow(), (const char*)func.mb_str(), (float)w, (unsigned short)(fap-1));
}
示例7: OnGridCellDClick
void FindResultsWnd::OnGridCellDClick(wxGridEvent& event)
{
int r = event.GetRow();
int c = event.GetCol();
cz::UTF8String filefullpath = wxStringToUtf8(m_grid->GetCellValue(r, kFC_FileFullPath));
long line = 0;
m_grid->GetCellValue(r, kFC_Line).ToLong(&line);
long col = 0;
m_grid->GetCellValue(r, kFC_Col).ToLong(&col);
auto file = gWorkspace->createFile(filefullpath);
if (file)
gFileEditorGroupWnd->gotoFile(file, line, col);
}
示例8: OnCellLClick
void udfFinalMarks::OnCellLClick( wxGridEvent& event )
{
int row = event.GetRow(),
col = event.GetCol();
wxString value = m_gridMarks->GetCellValue(row, col);
if(value.IsEmpty())
m_gridMarks->SetCellValue(row, col, _("X"));
else
m_gridMarks->SetCellValue(row, col, _(""));
event.Skip();
}
示例9: on_cell_dclick
void MyFrame::on_cell_dclick(wxGridEvent& evt) {
int col = evt.GetCol();
int row = evt.GetRow();
int id = evt.GetId();
for(auto const p : stepsGrids) {
if(p.second != id) continue;
if(wxTheClipboard->Open()) {
wxTheClipboard->SetData(new wxTextDataObject(p.first->GetCellValue(row, col)));
wxTheClipboard->Close();
}
}
}
示例10: OnCellClick
void BreakpointsWnd::OnCellClick(wxGridEvent& evt)
{
int r = evt.GetRow();
int c = evt.GetCol();
if (c==0 && r<=gWorkspace->getBreakpointCount())
{
gWorkspace->toggleBreakpoint(r);
updateState();
}
evt.Skip();
}
示例11: OnLabelRightDClick
//----------------------------------------------------------------------------------------
void DBGrid::OnLabelRightDClick( wxGridEvent& ev )
{
logBuf = _T("DBGrid::OnLabelRightDClick : ");
if ( ev.GetRow() != -1 )
{
logBuf << _T("row label ") << ev.GetRow();
}
else if ( ev.GetCol() != -1 )
{
logBuf << _T("col label ") << ev.GetCol();
}
else
{
logBuf << _T("corner label");
}
if ( ev.ShiftDown() )
logBuf << _T(" (shift down)");
// wxLogMessage( "%s", logBuf.c_str() );
logBuf += _T("\n");
wxLogMessage(logBuf.c_str());
ev.Skip();
}
示例12: OnGridEditorShown
virtual void OnGridEditorShown( wxGridEvent& event )
{
int row, col;
row = event.GetRow(); // 行?
col = event.GetCol(); // 列?
if (col==1) {
const wxString& dir = wxDirSelector("Choose a folder");
if ( !dir.empty() ) {
wxFileName f(dir);
m_grid_dir->SetCellValue(row, col, dir);
m_grid_dir->SetCellValue(row, 0, "Import." + f.GetName());
}
}
}
示例13: OnTableDBGridCellChange
void MultiViewerMain::OnTableDBGridCellChange(wxGridEvent& event)
{
int nRow = event.GetRow();
int nCol = event.GetCol();
if(eGridAdding == m_eGridState && m_nEditRow <= nRow) {
event.Skip();
return;
}
wxString wxStrCellValue = m_pTableDBDataGrid->GetCellValue(nRow, nCol);
string szStrCellVale = SQLUtil::wxstr2str(wxStrCellValue);
ModifyRow(nRow, nCol, szStrCellVale.c_str() );
}
示例14: OnCellChange
void LabelDialog::OnCellChange(wxGridEvent &event)
{
static bool guard = false;
int row = event.GetRow();
// Guard against recursion which can happen when a change to the "NEW label" row
// is made. When InsertRow() is done in TransferDataToWindow(), checks are made
// within wxGrid to see if the edit control is active and since it hasn't yet
// been marked inactive on the first time through here, we get entered again.
// Sort of a double change. I think this is probably a bug in wxGrid.
if (guard) {
return;
}
guard = true;
// The change was to an existing label, so go process it based
// on which column was changed.
RowData *rd = &mData[row];
switch (event.GetCol())
{
case Col_Track:
OnChangeTrack(event, row, rd);
break;
case Col_Label:
OnChangeLabel(event, row, rd);
break;
case Col_Stime:
OnChangeStime(event, row, rd);
break;
case Col_Etime:
OnChangeEtime(event, row, rd);
break;
case Col_Lfreq:
OnChangeLfreq(event, row, rd);
break;
case Col_Hfreq:
OnChangeHfreq(event, row, rd);
break;
}
// Done...no need for protection anymore
guard = false;
return;
}
示例15: OnCellChange
//----------------------------------------------------------------------------------------
void DBGrid::OnCellChange( wxGridEvent& ev )
{
logBuf = _T("DBGrid::OnCellChange : ");
logBuf << _T("Cell at row ") << ev.GetRow()
<< _T(" col ") << ev.GetCol();
// wxLogMessage( "%s", logBuf.c_str() );
// wxMessageBox(logBuf);
logBuf += _T("\n");
wxLogMessage(logBuf.c_str());
// you must call event skip if you want default grid processing
// (cell highlighting etc.)
//
ev.Skip();
}