void CGridLabThresholds::_CreateGrid(int nRows, int nCols) { int nPrevCols = 0; int nPrevRows = 0; int nCol; if(!m_bCreated) { m_bCreated = true; CreateGrid(nRows,nCols); SetRowLabelAlignment(wxALIGN_LEFT, wxALIGN_CENTRE); EnableDragColSize(false); EnableDragRowSize(false); SetDefaultCellAlignment(wxALIGN_RIGHT,wxALIGN_CENTRE); } else { nPrevRows = GetNumberRows(); nPrevCols = GetNumberCols(); nwxGrid::SetRowColCount(this,nRows,nCols); } for(nCol = nPrevCols; nCol < nCols; nCol++) { // set alignment for Channel row SetCellAlignment(0,nCol,wxALIGN_CENTRE, wxALIGN_CENTRE); } }
void CGridLocus::_ImplementColumn(int nCol,bool bAmel) { int nStart = nCol; int nStop = nCol; int i; int k; int n = GetNumberCols(); if(nCol >= n) { AppendCols(nCol - n + 1); nStart = n; } for(k = nStart; k <= nStop; ++k) { s.Printf("Peak %d",k+1); SetColLabelValue(k,s); for(i = ROW_RO_FIRST; i <= ROW_RO_LAST; i++) { DisableEdit(i,k); } SetBoolCell(ROW_HOMOZYGOUS,k); SetBoolCell(ROW_OFF_LADDER,k); SetBoolCell(ROW_DISABLE,k); SetCellEditor(ROW_BPS,k,new wxGridCellFloatEditor(12,7)); SetCellRenderer(ROW_BPS,k,new wxGridCellFloatRenderer(12,7)); if(!bAmel) { wxGridCellFloatEditor *pfe1(new wxGridCellFloatEditor(5,1)); wxGridCellFloatRenderer *pfr1(new wxGridCellFloatRenderer(5,1)); SetCellEditor(ROW_ALLELE,k,pfe1); SetCellRenderer(ROW_ALLELE,k,pfr1); } else { wxGridCellTextEditor *pe(new wxGridCellTextEditor); pe->SetParameters(_T("1")); SetCellEditor(ROW_ALLELE,k,pe); } SetCellAlignment(wxALIGN_RIGHT, ROW_ALLELE,k); SetCellAlignment(wxALIGN_RIGHT, ROW_BPS,k); SetCellAlignment(wxALIGN_RIGHT, ROW_RFU,k); SetCellAlignment(wxALIGN_RIGHT, ROW_TIME,k); SetCellAlignment(wxALIGN_RIGHT, ROW_PEAK_AREA,k); } }
CGridSampleLimits::CGridSampleLimits(wxWindow *parent, wxWindowID id) : _CGridEdit(parent,id), m_pValidatePct(NULL), m_pData(NULL), m_pMessageBook(NULL) //,m_bReadOnly(false) { wxString PEAKS(_T("peaks")); CreateGrid(ROW_MESSAGE_BOOK_OFFSET,2); EnableDragColSize(false); EnableDragRowSize(false); EnableScrolling(false,true); SetRowLabelValue(ROW_PULLUP,_T("Max. No. of pullups peaks per sample")); SetCellValue(ROW_PULLUP,1,PEAKS); SetRowLabelValue(ROW_STUTTER,_T("Max. No. of stutter peaks per sample")); SetCellValue(ROW_STUTTER,1,PEAKS); SetRowLabelValue(ROW_ADENYLATION,_T("Max. No. of adenylation peaks per sample")); SetCellValue(ROW_ADENYLATION,1,PEAKS); SetRowLabelValue(ROW_OFF_LADDER,_T("Max. off-ladder alleles per sample:")); SetCellValue(ROW_OFF_LADDER,1,PEAKS); SetRowLabelValue(ROW_RESIDUAL,_T("Max. residual for allele (<0.5 bp):")); SetCellValue(ROW_RESIDUAL,1,_T("Sample/Ladder BP alignment")); SetCellEditor(ROW_RESIDUAL,0,new wxGridCellFloatEditor(-1,4)); SetDefaultCellValidator(new nwxGridCellUIntRangeValidator(0,1000000,true)); SetCellValidator( new nwxGridCellDoubleRangeValidator(0.0,0.5,true), ROW_RESIDUAL,0); SetRowLabelValue(ROW_EXCESSIVE_RESIDUAL,_T("Max. No. of peaks with excessive residual:")); SetCellValue(ROW_EXCESSIVE_RESIDUAL,1,PEAKS); SetRowLabelValue(ROW_RFU_INCOMPLETE_SAMPLE,_T("Incomplete profile threshold for Reamp More/Reamp Less:")); SetCellValue(ROW_RFU_INCOMPLETE_SAMPLE,1,_T("RFU")); SetRowLabelValue(ROW_MIN_BPS_ARTIFACTS,_T("Ignore artifacts smaller than:")); SetCellValue(ROW_MIN_BPS_ARTIFACTS,1,_T("bps")); m_clrBackground = GetLabelBackgroundColour(); wxFont fnLabel = GetLabelFont(); for(int nRow = 0; nRow < ROW_MESSAGE_BOOK_OFFSET; nRow++) { SetCellBackgroundColour(nRow,1,m_clrBackground); SetReadOnly(nRow,1,true); SetCellFont(nRow,1,fnLabel); SetCellAlignment(nRow,0,wxALIGN_RIGHT, wxALIGN_CENTRE); } SetDefaultEditor(new wxGridCellFloatEditor(1,0)); SetColLabelValue(0,_T("Value")); SetColLabelValue(1,_T("Units")); SetRowLabelAlignment(wxALIGN_LEFT, wxALIGN_CENTRE); SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE); }
void DataGrid::setRow(int row) { SetCellAlignment(wxALIGN_RIGHT, row, IncomeIndex); SetCellAlignment(wxALIGN_RIGHT, row, OutlayIndex); SetCellAlignment(wxALIGN_RIGHT, row, BalanceIndex); SetReadOnly(row, IncomeIndex, false); SetReadOnly(row, OutlayIndex, false); SetReadOnly(row, DescIndex, false); SetReadOnly(row, CommentIndex, false); SetReadOnly(row, BalanceIndex); SetCellEditor(row, IncomeIndex, new wxGridCellFloatEditor(MONEY_LEN, 2)); SetCellEditor(row, OutlayIndex, new wxGridCellFloatEditor(MONEY_LEN, 2)); clearRow(row); for (int i = 0; i < ColumnNum; i++) { SetCellFont(row, i, GetDefaultCellFont()); SetCellTextColour(row, i, GetDefaultCellTextColour()); } }
CGridColorGrid::CGridColorGrid( wxWindow *parent, wxWindowID id) : wxGrid(parent, id, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE | wxWANTS_CHARS) { wxFont fnStatus = CGridAnalysis::GetFontStatus(); int nRow; size_t i; const size_t N = sizeof(aROWS) / sizeof(aROWS[0]); CreateGrid((int)ROW_COUNT,1); SetRowLabelSize(1); SetColLabelSize(1); DisableDragColSize(); DisableDragRowSize(); nwxGrid::SetAllReadOnly(this,true); fnStatus.SetPointSize(GetDefaultCellFont().GetPointSize()); SetColLabelValue(0,wxEmptyString); const ROW_INFO *pRow = aROWS; for(i = 0; i < N; i++) { nRow = (int) pRow->nRow; SetRowLabelValue(nRow,wxEmptyString); SetCellValue(nRow,0,pRow->psLabel); pRow++; } SetRowLabelValue((int)ROW_ATTN,wxEmptyString); SetCellFont((int) ROW_ATTN,0,fnStatus); SetCellValue((int) ROW_ATTN,0,CGridAnalysis::g_sStatusNeedsAttention); SetCellAlignment(wxALIGN_CENTRE,(int)ROW_ATTN,0); SetRowLabelValue((int)ROW_OK,wxEmptyString); SetCellFont((int) ROW_OK,0,fnStatus); SetCellValue((int) ROW_OK,0,CGridAnalysis::g_sStatusOK); SetCellAlignment(wxALIGN_CENTRE,(int)ROW_OK,0); }
void CGridSampleLimits::SetMessageBookRows(int n) { // int nOld = GetNumberRows(); int nNew = n + ROW_MESSAGE_BOOK_OFFSET; int nRow; nwxGrid::SetRowCount(this,ROW_MESSAGE_BOOK_OFFSET);// bug workaround nwxGrid::SetRowCount(this,nNew); for(nRow = ROW_MESSAGE_BOOK_OFFSET; nRow < nNew; nRow++) { //SetReadOnly(nRow,0,m_bReadOnly); SetReadOnly(nRow,1,true); SetCellAlignment(nRow,0,wxALIGN_RIGHT, wxALIGN_CENTRE); } }
void __fastcall TSpreadSheetRLForm::actApplyFormattingExecute(TObject *Sender) { TcxSSHeader *CHeader, *RHeader; TCursor CurCursor = Screen->Cursor; // preserve the current cursor Screen->Cursor = crHourGlass; // wait cursor FIsSaveSpreadSheet = false; cxSpreadBook->BeginUpdate(); try { cxSpreadBook->ActivePage = 0; // ensure we are looking at the first page // Firstly by setting the column widths CHeader = cxSpreadBook->ActiveSheet->Cols; CHeader->Size[0] = 140; for(int i = 1; i <= 8; i++) CHeader->Size[i] = 80; // and then the Row heights for the title and column descriptors RHeader = cxSpreadBook->ActiveSheet->Rows; RHeader->Size[0] = 30; RHeader->Size[2] = 30; // and how about some cell formatting // setting the title and column header fonts SetCellFont(0, 0, 0, 0, TFontStyles() << fsBold << fsUnderline, 12); // and now adding some cell shading // for the sheet title SetCellPattern(0, 0, 8, 1, 16, 1, fsSolid); // for the column headers SetCellPattern(0, 2, 8, 2, 23, 1, fsSolid); // and the company names SetCellPattern(0, 2, 0, FCurRow - 2, 23, 1, fsSolid); // and now some number formatting SetCellFormat(1,3,1,FCurRow-1, 3); // Holding Column #,##0 SetCellFormat(2,3,2,FCurRow-1,15); // Date Purchased d-mmm-yy SetCellFormat(3,3,6,FCurRow-1, 4); // Price/Cost/Value & Worth Column #,##0.00 SetCellFormat(7,3,7,FCurRow-1, 8); // Gain/(Loss) value (#,##0.00_);[Red](#,##0.00) SetCellFormat(8,3,8,FCurRow-1,10); // Gain/(Loss) percentage 0.00% // and now for the totals SetCellFormat(4,FCurRow,4,FCurRow, 8); // Total Purchase Cost ($#,##0.00_);[Red]($#,##0.00) SetCellFormat(6,FCurRow,7,FCurRow, 8); // Total Current Valuation ($#,##0.00_);[Red]($#,##0.00) SetCellFormat(8,FCurRow,8,FCurRow,10); // Total Gain/(Loss) percentage 0.00% // now lets align all the data SetCellAlignment(1,3,8,FCurRow, haRIGHT, vaCENTER); // Right Align all the numeric fields // and how about some borders for the totals SetCellBorders(4, FCurRow, 4, FCurRow, 1, lsThin); // thin single line at the top of the cell SetCellBorders(6, FCurRow, 6, FCurRow, 1, lsThin); SetCellBorders(7, FCurRow, 7, FCurRow, 1, lsThin); SetCellBorders(4, FCurRow, 4, FCurRow, 3, lsDouble); // double line at the bottom of the cell SetCellBorders(6, FCurRow, 6, FCurRow, 3, lsDouble); // double line at the bottom of the cell SetCellBorders(7, FCurRow, 7, FCurRow, 3, lsDouble); // double line at the bottom of the cell // and now a similar process for the Hi/Lo valuations page cxSpreadBook->ActivePage = 1; // ensure we are looking at the second page // Firstly by setting the column widths CHeader = cxSpreadBook->ActiveSheet->Cols; CHeader->Size[0] = 140; for(int i = 1; i<=4; i++) CHeader->Size[i] = 80; // and then the Row heights for the title and column descriptors RHeader = cxSpreadBook->ActiveSheet->Rows; RHeader->Size[0] = 30; RHeader->Size[2] = 30; // and how about some cell formatting // setting the title and column header fonts SetCellFont(0, 0, 0, 0, TFontStyles() << fsBold << fsUnderline, 12); // and now adding some cell shading // for the sheet title SetCellPattern(0, 0, 4, 1, 16, 1, fsSolid); // for the column headers SetCellPattern(0, 2, 4, 2, 23, 1, fsSolid); // and the company names SetCellPattern(0, 2, 0, FCurRow - 2, 23, 1, fsSolid); // and now some number formatting SetCellFormat(1, 3, 4, FCurRow - 1, 4); // Current, Hi, Lo and Average #,##0.00 // now lets align all the data SetCellAlignment(1, 3, 4, FCurRow, haRIGHT, vaCENTER); // Right Align all the numeric fields FIsSaveSpreadSheet = true; // enable the save spreadsheet button } __finally { cxSpreadBook->ActivePage = 0; // and back to the first page cxSpreadBook->EndUpdate(); Screen->Cursor = CurCursor; // and reset cursor } }
void CGridSampleLimits::SetData( CLabThresholds *pData, const CXMLmessageBook *pMessageBook) { m_pData = pData; m_pMessageBook = pMessageBook; typedef map<wxString,size_t> MSG_THRESHOLDS; set<wxString> setMsgThresholds; // message names for thresholds already used size_t nCount = ((m_pMessageBook != NULL) && m_pMessageBook->IsOK()) ? m_pMessageBook->GetMessageCount() : 0; if(nCount) { const wxString sEmpty; const wxString sUnitPCT(_T("%")); const CXMLmessageBookSM *pmsgSM; size_t nCountKeep = 0; bool bPct; // the following 5 will not use the message book setMsgThresholds.insert(CLabThresholds::g_psmNumberOfPullUpsInSample); setMsgThresholds.insert(CLabThresholds::g_psmNumberOfStuttersInSample); setMsgThresholds.insert(CLabThresholds::g_psmNumberOfAdenylationsInSample); setMsgThresholds.insert(CLabThresholds::g_psmNumberOfOffLadderAllelesInSample); setMsgThresholds.insert(CLabThresholds::g_psmNumberOfExcessiveResidualsInSample); m_vpMsgBookSM.clear(); m_vpMsgBookSM.reserve(nCount); for(size_t i = 0; i < nCount; i++) { pmsgSM = m_pMessageBook->GetMessage(i); if(setMsgThresholds.find(pmsgSM->GetName()) == setMsgThresholds.end()) { m_vpMsgBookSM.push_back(pmsgSM); setMsgThresholds.insert(pmsgSM->GetName()); if(!pmsgSM->EmptyDescriptor()) { nCountKeep++; } } } SetMessageBookRows((int)nCountKeep); if(nCountKeep) { wxFont fn = GetLabelFont(); vector<const CXMLmessageBookSM *>::iterator itrSM; int nRow = ROW_MESSAGE_BOOK_OFFSET; for(itrSM = m_vpMsgBookSM.begin(); itrSM != m_vpMsgBookSM.end(); ++itrSM) { pmsgSM = *itrSM; if(!pmsgSM->EmptyDescriptor()) { bPct = pmsgSM->IsPercent(); if(bPct) { SetCellValidator(GetPctValidator(),nRow,0); } SetRowLabelValue(nRow,pmsgSM->GetDescriptor()); SetCellBackgroundColour(nRow,1,m_clrBackground); SetCellFont(nRow,1,fn); SetCellValue(nRow,1,bPct ? sUnitPCT : sEmpty); SetReadOnly(nRow,1,true); if(pmsgSM->IsPreset()) { SetCellAlignment(nRow,0,wxALIGN_RIGHT,wxALIGN_CENTRE); } nRow++; } } } } SetCellValue(0,0,"00000000"); SetMargins(0,0); nwxGrid::UpdateLabelSizes(this); AutoSize(); }
void CGridAnalysis::UpdateGrid( COARfile *pFile, COARsampleSort *pSort, int nLabelType, int nLabelTypeName, const wxDateTime *pHistory, wxDC *pDC) { nwxGridBatch xBatch(this); wxDC *pDCuse = (pDC != NULL) ? pDC : GetDC(); DCholder xx(this,pDCuse); wxString sChannel; wxString sCell; int iRow; int nCol; int nReviewCount; int nAcceptCount; int nReviewNeeded; int nAcceptNeeded; size_t nRowCount = pSort->GetCount(); size_t nAlleleColCount = pFile->GetLocusCount(); size_t i; COARlocus *pLocus; COARsample *pSample; const COARmessages *pMsgs = pFile->GetMessages(); GRID_FLAG flagBase; GRID_FLAG flag; bool bAlert; bool bEdited; bool bSampleHasAlert; bool bSampleEdited; bool bNeedsAttention; bool bSampleDisabled; m_nLabelSize = 0; m_nLabelType = nLabelTypeName; #if 0 // moved to next loop // Set up row labels for(iRow = 0; iRow < (int)nRowCount; ++iRow) { pSample = pSort->GetSample((size_t)iRow); sName = pSample->GetName(); if(pSample->IsSampleLevelEdited(pFile->GetMessages(),pHistory)) { sName.Append(COARsample::g_sCellChannelEdited); } SetRowLabel(iRow,sName); } #endif // set up cells pFile->GetReviewerCounts(&nReviewNeeded,&nAcceptNeeded,CLabReview::REVIEW_SAMPLE); for(iRow = 0; iRow < (int)nRowCount; ++iRow) { // setup sample info flagBase = GRID_NORMAL; bNeedsAttention = false; pSample = pSort->GetSample((size_t)iRow); bSampleHasAlert = pSample->HasAnyAlerts(pMsgs,pHistory); bSampleEdited = pSample->IsEdited(pMsgs,pHistory); bSampleDisabled = pSample->IsDisabled(pHistory); const COARsampleReviewAccept &accept(pSample->GetAcceptance()); const COARsampleReviewAccept &review(pSample->GetReviews()); if(bSampleDisabled) { flagBase |= GRID_DISABLED; } else { if(bSampleHasAlert) { flagBase |= GRID_ALERT_SAMPLE; } if(bSampleEdited) { flagBase |= GRID_EDITED_SAMPLE; } } // Setup Row Label for sample bEdited = pSample->IsSampleLevelEdited(pMsgs,pHistory); bAlert = pSample->HasSampleAlert(pMsgs,pHistory); nAcceptCount = accept.GetSampleCount(pHistory); nReviewCount = review.GetSampleCount(pHistory); _SetupCellFlag( flagBase, bSampleDisabled,bEdited,bAlert, nAcceptCount, nAcceptNeeded, nReviewCount, nReviewNeeded, &flag,&bNeedsAttention); SetupRowLabel(pSample,iRow,nLabelTypeName,bEdited,bNeedsAttention); // ILS alert column bAlert = bSampleHasAlert && pSample->HasILSAlert(pMsgs,pHistory); bEdited = pSample->IsCellILSEdited(pMsgs,pHistory); nAcceptCount = accept.GetILSCount(pHistory); nReviewCount = review.GetILSCount(pHistory); pFile->GetReviewerCounts(&nReviewNeeded,&nAcceptNeeded,CLabReview::REVIEW_ILS); _SetupCellFlag( flagBase, bSampleDisabled,bEdited,bAlert, nAcceptCount, nAcceptNeeded, nReviewCount, nReviewNeeded, &flag,&bNeedsAttention); SetCellValue(iRow,CFrameAnalysis::ILS_COLUMN,pSample->GetCellILS(pMsgs,pHistory)); SetCellStyle( iRow,CFrameAnalysis::ILS_COLUMN,flag); // channel alert column sChannel = pSample->GetCellChannel(pMsgs,pHistory); bAlert = bSampleHasAlert && COARsample::HasChannelAlert(sChannel); bEdited = bSampleEdited && pSample->IsCellChannelEdited(pMsgs,pHistory); nAcceptCount = accept.GetChannelCount(pHistory); nReviewCount = review.GetChannelCount(pHistory); pFile->GetReviewerCounts(&nReviewNeeded,&nAcceptNeeded,CLabReview::REVIEW_CHANNEL); _SetupCellFlag( flagBase, bSampleDisabled,bEdited,bAlert, nAcceptCount, nAcceptNeeded, nReviewCount, nReviewNeeded, &flag,&bNeedsAttention); SetCellValue(iRow,CFrameAnalysis::CHANNEL_ALERT_COLUMN,sChannel); SetCellStyle(iRow,CFrameAnalysis::CHANNEL_ALERT_COLUMN,flag); SetReadOnly(iRow,CFrameAnalysis::ILS_COLUMN,true); SetReadOnly(iRow,CFrameAnalysis::CHANNEL_ALERT_COLUMN,true); SetReadOnly(iRow,CFrameAnalysis::STATUS_COLUMN,true); pFile->GetReviewerCounts(&nReviewNeeded,&nAcceptNeeded,CLabReview::REVIEW_LOCUS); for(i = 0, nCol = CFrameAnalysis::FIRST_LOCUS_COLUMN; i < nAlleleColCount; ++i, ++nCol) { SetReadOnly(iRow,nCol,true); pLocus = pSample->FindLocus(pFile->GetLocusName(i)); if(pLocus != NULL) { sCell = pLocus->GetCell(nLabelType,pHistory); bAlert = bSampleHasAlert && pLocus->HasAlerts(pMsgs,pHistory); const COARchannel *pChannel = pFile->GetChannelFromLocus(pLocus->GetName()); int nChannel = pChannel->GetChannelNr(); nAcceptCount = pLocus->GetAcceptanceCount(pHistory); nReviewCount = pLocus->GetReviewCount(pHistory); bEdited = pLocus->HasBeenEdited( pMsgs,pSample,nChannel,pHistory); _SetupCellFlag(flagBase, bSampleDisabled,bEdited,bAlert, nAcceptCount,nAcceptNeeded, nReviewCount,nReviewNeeded, &flag,&bNeedsAttention); if(sCell.IsEmpty()) { if(bAlert) { sCell = _T("?"); } else if(bEdited) { sCell = COARsample::g_sCellChannelEdited; } } SetCellValue(iRow,nCol,sCell); SetCellStyle(iRow,nCol,flag); } else { SetCellValue(iRow,nCol,wxEmptyString); SetCellStyle(iRow,nCol,flagBase); } } // setup control cell SetReadOnly(iRow,nCol,true); SetCellValue(iRow,nCol,pSample->GetPositiveControl()); SetCellStyle(iRow,nCol,flagBase); // setup status cell SetReadOnly(iRow,CFrameAnalysis::STATUS_COLUMN,true); if(bSampleDisabled) { SetCellValue(iRow,CFrameAnalysis::STATUS_COLUMN,_T("")); SetCellStyle(iRow,CFrameAnalysis::STATUS_COLUMN,flagBase); } else { CParmOsirisGlobal parm; const wxColour &clFg(parm->GetStatusForeground(bNeedsAttention)); const wxColour &clBg(parm->GetStatusBackground(bNeedsAttention)); const wxString &s( bNeedsAttention ? g_sStatusNeedsAttention : g_sStatusOK); SetCellValue(iRow,CFrameAnalysis::STATUS_COLUMN,s); SetCellFont(iRow,CFrameAnalysis::STATUS_COLUMN,g_fontStatus); SetCellBackgroundColour(iRow,CFrameAnalysis::STATUS_COLUMN,clBg); SetCellTextColour(iRow,CFrameAnalysis::STATUS_COLUMN,clFg); SetCellAlignment( iRow,CFrameAnalysis::STATUS_COLUMN, wxALIGN_CENTRE,wxALIGN_CENTRE); SetCellAlignment( iRow,CFrameAnalysis::ILS_COLUMN, wxALIGN_CENTRE,wxALIGN_CENTRE); } } AutoSize(); UpdateLabelSize(); }
CGridAlerts::CGridAlerts( COARmessages *pMsgEdit, wxWindow *parent, wxWindowID id, int nType, bool bReadOnly) : _CGridEdit(parent,id,bReadOnly), m_pMsgEdit(pMsgEdit), m_nChannelColumn(-1), m_nLocusColumn(-1), m_nInCellChangeEvent(0) { int bChannel = !!(nType & TYPE_CHANNEL); int bLocus = !!(nType & TYPE_LOCUS); size_t nCount = m_pMsgEdit->GetMessageCount(); if(nCount) { const wxString sDisable(_T("Enabled")); int nColCount = 2 + bChannel + bLocus; int nCol = nColCount; CreateGrid((int)nCount,nColCount); SetColLabelAlignment(wxALIGN_LEFT, wxALIGN_CENTRE); SetColLabelValue(--nCol,_T("Alert")); SetColLabelValue(--nCol,sDisable); if(bChannel) { SetColLabelValue(--nCol,LABEL_CHANNEL); m_nChannelColumn = nCol; } if(bLocus) { SetColLabelValue(--nCol,LABEL_LOCUS); m_nLocusColumn = nCol; } SetRowLabelSize(2); for(size_t j = 0; j < nCount; j++) { nCol = nColCount; SetCellAlignment((int)j,--nCol,wxALIGN_LEFT,wxALIGN_CENTRE); SetBoolCell((int)j,--nCol); SetCellAlignment((int)j,nCol,wxALIGN_CENTRE,wxALIGN_CENTRE); if(bChannel) { SetCellAlignment((int)j,m_nChannelColumn,wxALIGN_CENTRE,wxALIGN_CENTRE); SetReadOnly((int)j,m_nChannelColumn,true); } if(bLocus) { SetCellAlignment((int)j,m_nLocusColumn,wxALIGN_LEFT,wxALIGN_CENTRE); SetReadOnly((int)j,m_nLocusColumn,true); } SetRowLabelValue((int)j,wxEmptyString); } TransferDataToWindow(); SetColLabelSize(GetRowSize(0)); } else { CreateGrid(1,1); nwxGrid::SetMessageGrid(this,_T("There are no " COAR_NOTICE_DISPLAY)); } AutoSizeColumns(); DisableDragRowSize(); if(bReadOnly) { DisableDragColSize(); } }