当前位置: 首页>>代码示例>>C++>>正文


C++ wxGridEvent::GetCol方法代码示例

本文整理汇总了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();
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:11,代码来源:griddemo.cpp

示例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();
}
开发者ID:ruifig,项目名称:nutcracker,代码行数:11,代码来源:BreakpointsWnd.cpp

示例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();
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:11,代码来源:griddemo.cpp

示例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();
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:12,代码来源:griddemo.cpp

示例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();
    }
}
开发者ID:ebrady1,项目名称:xLights,代码行数:12,代码来源:LMSImportChannelMapDialog.cpp

示例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));
}
开发者ID:bestdpf,项目名称:xface-error,代码行数:40,代码来源:FDPPanel.cpp

示例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);
}
开发者ID:ruifig,项目名称:nutcracker,代码行数:13,代码来源:FindResultsWnd.cpp

示例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();
}
开发者ID:AndrianDTR,项目名称:udf,代码行数:13,代码来源:udfFinalMarks.cpp

示例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();
        }
    }
}
开发者ID:ts14ic,项目名称:UTM-CO,代码行数:13,代码来源:main.cpp

示例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();
}
开发者ID:ruifig,项目名称:nutcracker,代码行数:13,代码来源:BreakpointsWnd.cpp

示例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();
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:23,代码来源:dbgrid.cpp

示例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());
			}
		}
	}
开发者ID:caicry,项目名称:wxVSImport,代码行数:14,代码来源:main.cpp

示例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() );
}
开发者ID:yiunsr,项目名称:multidbviewer,代码行数:14,代码来源:MultiViewerMain.cpp

示例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;
}
开发者ID:LarryPAC,项目名称:audacity,代码行数:50,代码来源:LabelDialog.cpp

示例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();
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:15,代码来源:dbgrid.cpp


注:本文中的wxGridEvent::GetCol方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。