int CxEdit::DeleteLine(int nLine, BOOL bScroll, int nCount /*= 1*/) { if (nCount >= 1) { const int linecount = GetLineCount(); const BOOL bFirstLine = (nLine == 0); const BOOL bLastLine = (nLine == (linecount - 1)); //TRACE("%i,%i,%i\n", LineIndex(nLine - 1), LineLength(nLine - 1), LineIndex(nLine)); const int nStartChar = (bLastLine && (!bFirstLine)) ? (LineIndex(nLine - 1) + LineLength(nLine - 1) + 0) : LineIndex(nLine); const int nEndChar = ((nLine + nCount) >= linecount) ? (LineIndex(linecount - 1) + LineLength(linecount - 1) + 0) : LineIndex(nLine + nCount); const BOOL bReadOnly = IsStyleReadOnly(); if (bReadOnly) { SetReadOnly(FALSE); } SetSel(nStartChar, nEndChar, !bScroll); // end of edit text Clear(); // ..then delete GotoEnd(bScroll); if (bReadOnly) { SetReadOnly(TRUE); } } return GetLineCount(); }
BOOL CRGXEvents::OnLButtonClickedRowCol(ROWCOL nRow, ROWCOL nCol, UINT nFlags, CPoint pt) { long lEventNr = 0; //TRACE("OnLButtonClickedRowCol!\n"); SetReadOnly(FALSE); SetStyleRange(CGXRange(1, 0, GetRowCount(), 12), CGXStyle().SetFont(CGXFont()./*SetSize(14).*/SetBold(FALSE)) ); SetStyleRange(CGXRange(nRow, 0, nRow, 12), CGXStyle().SetFont(CGXFont()./*SetSize(14).*/SetBold(TRUE)) ); SetReadOnly(TRUE); if (nRow >= 1) { //TRACE("Valittu rivi %d\n", nRow); m_lCurrentLoanEventNr = atol(GetValueRowCol(nRow,17)); GetParent()->SendMessage(WM_COMMAND, GetDlgCtrlID() | RJ_OG_PARENT_DLG << 16, (LONG) GetSafeHwnd()); } return TRUE; }
void CatheterGrid::setRowReadOnly(int row, bool readOnly) { if (row >= GetNumberRows()) return; SetReadOnly(row, CHANNEL_COL, readOnly); SetReadOnly(row, CURRENT_COL, readOnly); SetReadOnly(row, DIRECTION_COL, readOnly); SetReadOnly(row, DELAY_COL, readOnly); }
void ZoomText::DoClear() { m_classes.clear(); m_locals.clear(); SetReadOnly(false); SetText(""); SetReadOnly(true); }
/*---------------------------------------------------------------------------*/ void wxDDLEditor::SetValue(const wxString& value) { bool ro = GetReadOnly(); SetReadOnly(false); SetText(value); SetReadOnly(ro); }
void CatheterCmdGrid::setRowReadOnly(int row, bool ReadOnly) { SetReadOnly(row, CHANNEL_COL, ReadOnly); SetReadOnly(row, CURRENT_COL, ReadOnly); SetReadOnly(row, DIR_COL, ReadOnly); SetReadOnly(row, DELAY_COL, ReadOnly); Fit(); }
void OutputCtrl::Clear() { SetReadOnly( false ); ClearAll(); SetReadOnly( true ); m_Selected = -1; ClearErrors(); }
void CRGXDeskLogRows::clear() { SetReadOnly(FALSE); SetTopRow(1); MoveCurrentCell(GX_TOPLEFT); SetRowCount(0); Redraw(); SetReadOnly(TRUE); }
/// outputs text by appending and scrolling to the output line void OutputText(LPCTSTR pszText) { CStringA cszaText(pszText); SetReadOnly(false); AppendText(cszaText.GetString(), cszaText.GetLength()); SetReadOnly(true); ScrollToLine(GetLineCount()); }
void ZoomText::UpdateText(IEditor* editor) { if(!editor) { DoClear(); } else { SetReadOnly(false); SetText(editor->GetEditorText()); SetReadOnly(true); SetCurrentPos(editor->GetCurrentPosition()); } }
void DisassemblyTextCtrl::OnDclick(wxMouseEvent& event) { if(GetStatus()) { SetStatus(0); PluginsArray plugins = Manager::Get()->GetPluginManager()->GetDebuggerOffers(); if (plugins.GetCount()) { cbDebuggerPlugin* dbg = (cbDebuggerPlugin*)plugins[0]; if (dbg) { // is the debugger running? if (dbg->IsRunning()) { dbg->StepByStep(); } } } } int LineNum = GetCurrentLine(); int L2 = GetCurrentLine(); wxString LineText,SourceFile; unsigned long SourceLine=0; while(LineNum > 0) { LineText = GetLine(LineNum--); if(reRelativePath.Matches(LineText)) break; } if(LineText.IsEmpty()) return ; LineText.AfterLast(_T(':')).ToULong(&SourceLine,10); SourceFile = Manager::Get()->GetProjectManager()->GetActiveProject()->GetBasePath(); SourceFile << LineText.Before(_T(':')); SyncEditor(LineText.Before(_T(':')),SourceLine,true); SetReadOnly(false); MarkerDeleteAll(DEBUG_MARKER); MarkerAdd(SourceLine,DEBUG_MARKER); SetReadOnly(true); //wxMessageBox(wxString::Format(_T("%s:%d"),SourceFile.c_str(),SourceLine)); event.Skip(); }
void Threads::AddThread(const wxString &id, const wxString &name) { AppendRows(); SetCellValue(numThreads, 0, id); SetCellValue(numThreads, 1, name); SetReadOnly(numThreads, 0); SetReadOnly(numThreads, 1); ++numThreads; }
void ModelDialog::UpdateStartChannels() { UpdateRowCount(); if(!cbIndividualStartNumbers->IsChecked()) { SetDefaultStartChannels(); SetReadOnly(true); } else { SetReadOnly(false); } }
CGridLocus::CGridLocus( COARlocus *pLocusEdit, wxWindow *parent, wxWindowID id, bool bReadOnly) : _CGridEdit(parent,id,bReadOnly), m_pLocusEdited(pLocusEdit) { wxSize sz; size_t nCount = m_pLocusEdited->AlleleCount(); size_t j; int nCol = nCount ? (int) nCount : 1; int nRow = nCount ? nLABELS : 1; int i; int k; CreateGrid(nRow,nCol); if(!nCount) { SetRowLabelValue(0,wxEmptyString); SetColLabelValue(0,wxEmptyString); SetReadOnly(0,0,true); SetReadOnly(0,1,true); SetReadOnly(1,0,true); SetReadOnly(1,1,true); } else { bool bAmel = m_pLocusEdited->IsAmel(); for(i = 0; i < nRow; i++) { s = _T(labels[i]); SetRowLabelValue(i,s); SetRowLabelAlignment(wxALIGN_LEFT, wxALIGN_CENTRE); } for(j = 0; j < nCount; j++) { k = (int)j; _ImplementColumn(k,bAmel); } TransferDataToWindow(); nwxGrid::UpdateLabelSizes(this); } DisableDragRowSize(); DisableDragColSize(); SetColLabelSize(GetRowSize(0)); s.Empty(); }
void wxExListItem::Update() { SetImage(m_FileName.GetStat().IsOk() ? wxExGetIconID(m_FileName): -1); m_ListView->SetItem(*this); SetReadOnly(m_FileName.GetStat().IsReadOnly()); if ( m_ListView->InReportView() && m_FileName.GetStat().IsOk()) { const unsigned long size = m_FileName.GetStat().st_size; // to prevent warning SetItem(_("Type"), (wxFileName::DirExists(m_FileName.GetFullPath()) ? // IsDir not ok m_FileSpec: m_FileName.GetExt())); SetItem(_("In Folder"), m_FileName.GetPath()); SetItem(_("Size"), (!wxFileName::DirExists(m_FileName.GetFullPath()) ? // IsDir not ok (wxString::Format("%lu", size)): wxString(wxEmptyString))); SetItem(_("Modified"), m_FileName.GetStat().GetModificationTime()); } }
void run(i_status_notif* cb) { RFs fileSystem; _LIT(LDD_Name,"c:\\system\\lib\\test.ldd"); TInt err; TBuf<100> buf; TInt ret = 0; fileSystem.Connect(); TRAP(err, ret = LoadLogicalDriverL(fileSystem, LDD_Name, cb)); if(err == KErrAccessDenied) { SetReadOnly(fileSystem, LDD_Name, ETrue); TRAP(err, ret = LoadLogicalDriverL(fileSystem, LDD_Name, cb)); } if(err == KErrAlreadyExists) { cb->error(_L("KErrAlreadyExists")); return; } else if(err == KErrNoMemory) { cb->error(_L("KErrNoMemory")); return; } else if(err != KErrNone) { buf.Format(_L("Error: %d"), err); cb->error(buf); } else cb->error(_L("KErrNone")); if(ret) RestoreLDD(fileSystem, LDD_Name); }
CGridAnalysis::CGridAnalysis(wxWindow *pParent) : wxGrid(pParent,IDgrid), m_bgBold(255,255,160), m_bgNormal(255,255,255), m_bgRowHasAlert(255,255,218), m_fgBold(192,0,0), m_fgNormal(0,0,0), m_pDC(NULL), m_nLabelSize(0), m_nLabelType(-1), m_nXScroll(0), m_nYScroll(0), m_nIDmenuSort(IDmenuSortFileName) { CreateGrid(1,1); SetRowLabelValue(0,wxEmptyString); SetColLabelValue(0,wxEmptyString); SetReadOnly(0,0,true); SetRowLabelAlignment(wxALIGN_LEFT,wxALIGN_CENTRE); m_fontNormal = GetDefaultCellFont(); m_fontItalic = m_fontNormal; m_fontBold = m_fontNormal; m_fontBold.SetWeight(wxFONTWEIGHT_BOLD); m_fontBoldItalic = m_fontBold; m_fontBoldItalic.SetStyle(wxFONTSTYLE_ITALIC); m_fontItalic.SetStyle(wxFONTSTYLE_ITALIC); #if USE_WINGDINGS g_fontStatus.SetPointSize(m_fontNormal.GetPointSize()); #else // X11 if ever implemented g_fontStatus = m_fontBold; #endif }
void CEditUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue) { if( _tcscmp(pstrName, _T("readonly")) == 0 ) SetReadOnly(_tcscmp(pstrValue, _T("true")) == 0); else if( _tcscmp(pstrName, _T("password")) == 0 ) SetPasswordMode(_tcscmp(pstrValue, _T("true")) == 0); else if( _tcscmp(pstrName, _T("maxchar")) == 0 ) SetMaxChar(_ttoi(pstrValue)); else if( _tcscmp(pstrName, _T("normalimage")) == 0 ) SetNormalImage(pstrValue); else if( _tcscmp(pstrName, _T("hotimage")) == 0 ) SetHotImage(pstrValue); else if( _tcscmp(pstrName, _T("focusedimage")) == 0 ) SetFocusedImage(pstrValue); else if( _tcscmp(pstrName, _T("disabledimage")) == 0 ) SetDisabledImage(pstrValue); else if( _tcscmp(pstrName, _T("nativebkcolor")) == 0 ) { if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue); LPTSTR pstr = NULL; DWORD clrColor = _tcstoul(pstrValue, &pstr, 16); SetNativeEditBkColor(clrColor); } else if (_tcscmp(pstrName, _T("autocompletemode")) == 0) { if (_tcscmp(pstrValue, _T("None")) == 0) SetAutoCompleteMode(None); else if (_tcscmp(pstrValue, _T("Append")) == 0) SetAutoCompleteMode(Append); else if (_tcscmp(pstrValue, _T("Suggest")) == 0) SetAutoCompleteMode(Suggest); else if (_tcscmp(pstrValue, _T("SuggestAppend")) == 0) SetAutoCompleteMode(SuggestAppend); } else CLabelUI::SetAttribute(pstrName, pstrValue); }
void CGridLabThresholds::DisableCell(int nRow, int nCol) { SetReadOnly(nRow,nCol,true); SetCellBackgroundColour(nRow,nCol, GetGridLineColour()); SetCellValue(wxEmptyString,nRow,nCol); }
void CWordAppUi::CreateEdwinL() { CGraphicsDevice* device=iCoeEnv->ScreenDevice(); iAppZoom.SetGraphicsDeviceMap(device); iAppZoom.SetZoomFactor(KDefaultZoomState); iRichEd=new(ELeave) CWordTextEditor(TGulBorder::ESingleBlack); const TInt flags=EEikEdwinOwnsWindow|EEikEdwinKeepDocument|EEikEdwinInclusiveSizeFixed|EEikEdwinUserSuppliedText| EEikEdwinNoAutoSelection|EEikEdwinAlwaysShowSelection; iRichEd->ConstructL(NULL,0,0,flags); iRichEd->SetObserver(this); iRichEd->SetEdwinObserver(this); iRichEd->CreateScrollBarFrameL(); iRichEd->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto); iRichEd->SetAdjacent(EGulAdjTop|EGulAdjRight); iRichEd->SetZoomFactorL(&iAppZoom); // SetEdwinL(); // iTest = CWordTest::NewL(iRichEd->TextView()); iTest->TurnOnCustomDrawing(iRichEd->TextLayout()); iRichEd->ActivateL(); // iRichEd->SetFocus(ETrue); AddToStackL(iRichEd); iRichEd->TextView()->SetParagraphFillTextOnly(ETrue); // call when text view has been initalised SetReadOnly(iEmbeddedAndReadOnly); }
/** * @brief 文書の新規作成 */ void CFootyDoc::CreateNew(int nGlobalID) { // 今までの情報を全て破棄する m_lsLines.clear(); m_lsUndoBuffer.clear(); m_lsEmphasisWord.clear(); m_pNowUndoPos = m_lsUndoBuffer.end(); SetSavePoint(); SetReadOnly( false ); // 最初の1行を挿入する CFootyLine cFirstLine; cFirstLine.m_strLineData = L""; m_lsLines.push_back(cFirstLine); // エディタ上の位置を設定する m_cCaretPos.SetPosition(&m_lsLines,0,0); SendMoveCaretCallBack(); for (int i=0;i<4;i++) { m_cFirstVisibleLine[i].SetPosition(m_lsLines.begin()); } // 変数初期化 m_nSelectType = SELECT_NONE; m_nLineMode = LM_CRLF; m_nGlobalID = nGlobalID; }
void CGridLabThresholds::_SetColCount(int nCols) { int nOldCount = m_bCreated ? GetNumberCols() : 0; int nCol; int nRow; _CreateGrid(m_nRows,nCols); if(nOldCount <= 1) { nOldCount = 0; } else { // ummerge all cells in first row for(nCol = 0; nCol < nOldCount; nCol++) { SetCellSize(0,nCol,1,1); } } // set Renderer and Editor for(nRow = 1; nRow < m_nRows; nRow++) { for(nCol = nOldCount; nCol < nCols; nCol++) { SetCellEditor(nRow,nCol,new wxGridCellFloatEditor(-1,4)); SetReadOnly(nRow,nCol,m_bReadOnly); } } }
void DcapWellboreZoneDesigGridCell::UpdateText() { if (DataCaptureGridCtrl::wellboreZoneStrings.IsEmpty()) return; if (dataCaptureData.IsValid(tzcIndex)) { DataCaptureSpec& currDCap = dataCaptureData.GetRef(tzcIndex); if (currDCap.IsTestZoneBased()) { if (IsNull(currDCap.wellboreZoneID)) { SetText("???"); } else { SetText(currDCap.wellboreZoneID); } } else SetText("n/a"); SetReadOnly(!currDCap.IsTestZoneBased()); return; } SetText(nullStr); }
void BUIEdit::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue) { if (_tcscmp(pstrName, _T("readonly")) == 0) { SetReadOnly(_tcscmp(pstrValue, _T("true")) == 0); } else if (_tcscmp(pstrName, _T("numberonly")) == 0) { SetNumberOnly(_tcscmp(pstrValue, _T("true")) == 0); } else if (_tcscmp(pstrName, _T("password")) == 0) { SetPasswordMode(_tcscmp(pstrValue, _T("true")) == 0); } else if (_tcscmp(pstrName, _T("maxchar")) == 0) { SetMaxChar(_ttoi(pstrValue)); } else if ( _tcscmp(pstrName, _T("normalimage")) == 0) { SetNormalImage(pstrValue); } else if (_tcscmp(pstrName, _T("hotimage")) == 0) { SetHotImage(pstrValue); } else if (_tcscmp(pstrName, _T("focusedimage")) == 0) { SetFocusedImage(pstrValue); } else if (_tcscmp(pstrName, _T("disabledimage")) == 0) { SetDisabledImage(pstrValue); } else if (_tcscmp(pstrName, _T("nativebkcolor")) == 0) { if (*pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue); LPTSTR pstr = NULL; DWORD clrColor = _tcstoul(pstrValue, &pstr, 16); SetNativeEditBkColor(clrColor); } BUILabel::SetAttribute(pstrName, pstrValue); }
//--------------- //---功能:修改和保存按钮消息响应函数--- //---完成人:张政桢--- //---完成时间:2012-12-26--- //---修改时间:2012-12-28--- //--------------- void CDlgPatientInfo::OnBnClickedEditModsave() { // TODO: 在此添加控件通知处理程序代码 if (0 == m_flagOperate) { m_flagOperate = 1; SetReadOnly(FALSE); // 设为修改状态 GetDlgItem(ID_BUTTON_MODSAVE)->SetWindowText(_T("保存")); GetDlgItem(ID_BUTTON_OKCANCEL)->SetWindowText(_T("取消")); } else if (1 == m_flagOperate) { if (IDOK == MessageBox(_T("确认修改?"), _T("提示"), MB_OKCANCEL)) { // 下面执行数据库修改操作 if (ModifyDatabase()) { MessageBox(_T("修改成功"), _T("提示"), MB_OK); GetDlgItem(ID_BUTTON_MODSAVE)->SetWindowText(_T("修改")); GetDlgItem(ID_BUTTON_OKCANCEL)->SetWindowText(_T("确定")); m_flagOperate = 0; UpdateData(FALSE); SetReadOnly(TRUE); // 设为只读状态 } else { MessageBox(_T("修改失败"), _T("提示"), MB_OK); } } } else if (2 == m_flagOperate || 3 == m_flagOperate) // 如果为添加 { if (IDOK == MessageBox(_T("确认添加?"), _T("提示"), MB_OKCANCEL)) { // 下面执行数据库修改操作 if (ModifyDatabase()) { MessageBox(_T("添加成功"), _T("提示"), MB_OK); OnOK(); } else { MessageBox(_T("添加失败"), _T("提示"), MB_OK); } } } }
Edit::Edit (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style) : wxStyledTextCtrl (parent, id, pos, size, style) { m_filename = wxEmptyString; m_LineNrID = 0; m_DividerID = 1; m_FoldingID = 2; // initialize language m_language = NULL; // default font for all styles SetViewEOL (g_CommonPrefs.displayEOLEnable); SetIndentationGuides (g_CommonPrefs.indentGuideEnable); SetEdgeMode (g_CommonPrefs.longLineOnEnable? wxSTC_EDGE_LINE: wxSTC_EDGE_NONE); SetViewWhiteSpace (g_CommonPrefs.whiteSpaceEnable? wxSTC_WS_VISIBLEALWAYS: wxSTC_WS_INVISIBLE); SetOvertype (g_CommonPrefs.overTypeInitial); SetReadOnly (g_CommonPrefs.readOnlyInitial); SetWrapMode (g_CommonPrefs.wrapModeInitial? wxSTC_WRAP_WORD: wxSTC_WRAP_NONE); wxFont font(wxFontInfo(10).Family(wxFONTFAMILY_MODERN)); StyleSetFont (wxSTC_STYLE_DEFAULT, font); StyleSetForeground (wxSTC_STYLE_DEFAULT, *wxBLACK); StyleSetBackground (wxSTC_STYLE_DEFAULT, *wxWHITE); StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour (wxT("DARK GREY"))); StyleSetBackground (wxSTC_STYLE_LINENUMBER, *wxWHITE); StyleSetForeground(wxSTC_STYLE_INDENTGUIDE, wxColour (wxT("DARK GREY"))); InitializePrefs (DEFAULT_LANGUAGE); // set visibility SetVisiblePolicy (wxSTC_VISIBLE_STRICT|wxSTC_VISIBLE_SLOP, 1); SetXCaretPolicy (wxSTC_CARET_EVEN|wxSTC_VISIBLE_STRICT|wxSTC_CARET_SLOP, 1); SetYCaretPolicy (wxSTC_CARET_EVEN|wxSTC_VISIBLE_STRICT|wxSTC_CARET_SLOP, 1); // markers MarkerDefine (wxSTC_MARKNUM_FOLDER, wxSTC_MARK_DOTDOTDOT, wxT("BLACK"), wxT("BLACK")); MarkerDefine (wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_ARROWDOWN, wxT("BLACK"), wxT("BLACK")); MarkerDefine (wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY, wxT("BLACK"), wxT("BLACK")); MarkerDefine (wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_DOTDOTDOT, wxT("BLACK"), wxT("WHITE")); MarkerDefine (wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_ARROWDOWN, wxT("BLACK"), wxT("WHITE")); MarkerDefine (wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY, wxT("BLACK"), wxT("BLACK")); MarkerDefine (wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY, wxT("BLACK"), wxT("BLACK")); // annotations AnnotationSetVisible(wxSTC_ANNOTATION_BOXED); // miscellaneous m_LineNrMargin = TextWidth (wxSTC_STYLE_LINENUMBER, wxT("_999999")); m_FoldingMargin = 16; CmdKeyClear (wxSTC_KEY_TAB, 0); // this is done by the menu accelerator key SetLayoutCache (wxSTC_CACHE_PAGE); UsePopUp(wxSTC_POPUP_ALL); }
void CStrikingEdit::OnKillFocus(CWnd* pNewWnd) { CEdit::OnKillFocus(pNewWnd); SetReadOnly(TRUE); Invalidate(); OutputDebugString("KILL_FOCUS\n"); }
void CTCEdit::TCSetReadOnly(bool set) { if(set) m_isReadOnly = true; else m_isReadOnly = false; SetReadOnly(set); }
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 CStrikingEdit::OnSetFocus(CWnd* pOldWnd) { CEdit::OnSetFocus(pOldWnd); SetReadOnly(FALSE); Invalidate(); OutputDebugString("SET_FOCUS\n"); }