文章目录
1.问题
- 当CComboUI控件处于不可见时,SelectItem无效果的解决方法。
2.duilib源码分析
bool CComboUI::SelectItem(int iIndex, bool bTakeFocus)
{
if( m_pWindow != NULL ) m_pWindow->Close();
if( iIndex == m_iCurSel ) return true;
int iOldSel = m_iCurSel;
if( m_iCurSel >= 0 ) {
CControlUI* pControl = static_cast<CControlUI*>(m_items[m_iCurSel]);
if( !pControl ) return false;
IListItemUI* pListItem = static_cast