MCPcopy Create free account
hub / github.com/SOUI2/soui / SetCurSel

Method SetCurSel

SOUI/src/control/SListbox.cpp:57–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57BOOL SListBox::SetCurSel(int nIndex)
58{
59 if(nIndex >= GetCount())
60 return FALSE;
61
62 if(nIndex < 0 ) nIndex =-1;
63
64 if(m_iSelItem == nIndex) return 0;
65 int nOldSelItem = m_iSelItem;
66 m_iSelItem = nIndex;
67
68 if(IsVisible(TRUE))
69 {
70 if(nOldSelItem != -1)
71 RedrawItem(nOldSelItem);
72 if(m_iSelItem!=-1)
73 RedrawItem(m_iSelItem);
74 }
75 return TRUE;
76}
77
78int SListBox::GetTopIndex() const
79{

Callers 6

OnInitDialogMethod · 0.45
SetCurSelFunction · 0.45
getViewMethod · 0.45
OnCommandMethod · 0.45
OnTabPageRadioSwitchMethod · 0.45
OnCtrlPageClickMethod · 0.45

Calls 1

GetCountFunction · 0.85

Tested by

no test coverage detected