| 1955 | } |
| 1956 | |
| 1957 | void CListTextElementUI::SetText(int iIndex, LPCTSTR pstrText) |
| 1958 | { |
| 1959 | if( m_pOwner == NULL ) return; |
| 1960 | TListInfoUI* pInfo = m_pOwner->GetListInfo(); |
| 1961 | if( iIndex < 0 || iIndex >= pInfo->nColumns ) return; |
| 1962 | while( m_aTexts.GetSize() < pInfo->nColumns ) { m_aTexts.Add(NULL); } |
| 1963 | |
| 1964 | CDuiString* pText = static_cast<CDuiString*>(m_aTexts[iIndex]); |
| 1965 | if( (pText == NULL && pstrText == NULL) || (pText && *pText == pstrText) ) return; |
| 1966 | |
| 1967 | if ( pText ) //by cddjr 2011/10/20 |
| 1968 | pText->Assign(pstrText); |
| 1969 | else |
| 1970 | m_aTexts.SetAt(iIndex, new CDuiString(pstrText)); |
| 1971 | Invalidate(); |
| 1972 | } |
| 1973 | |
| 1974 | void CListTextElementUI::SetOwner(CControlUI* pOwner) |
| 1975 | { |
no test coverage detected