| 19 | } |
| 20 | |
| 21 | BOOL SComboView::CreateListBox(pugi::xml_node xmlNode) |
| 22 | { |
| 23 | SASSERT(xmlNode); |
| 24 | //创建列表控件 |
| 25 | pugi::xml_node listStyle = xmlNode.child(L"listStyle"); |
| 26 | SStringW strListClass = listStyle.attribute(L"wndclass").as_string(SListView::GetClassName()); |
| 27 | m_pListBox=sobj_cast<SListView>(SApplication::getSingleton().CreateWindowByName(strListClass)); |
| 28 | SASSERT(m_pListBox); |
| 29 | |
| 30 | m_pListBox->SetContainer(GetContainer()); |
| 31 | |
| 32 | m_pListBox->InitFromXml(listStyle); |
| 33 | m_pListBox->SetAttribute(L"pos", L"0,0,-0,-0", TRUE); |
| 34 | m_pListBox->SetAttribute(L"hotTrack",L"1",TRUE); |
| 35 | m_pListBox->SetOwner(this); //chain notify message to combobox |
| 36 | m_pListBox->SetID(IDC_DROPDOWN_LIST); |
| 37 | |
| 38 | return TRUE; |
| 39 | } |
| 40 | |
| 41 | int SComboView::GetListBoxHeight() |
| 42 | { |
nothing calls this directly
no test coverage detected