git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53560
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- Generalized wxScrolledWindow into wxScrolled<T> template that can derive
from any window class, not just wxPanel.
- Allow having menu separators with ids != wxID_SEPARATOR (Jeff Tupper)
- Generalized wxScrolledWindow into wxScrolled<T> template that can derive
from any window class, not just wxPanel.
- Allow having menu separators with ids != wxID_SEPARATOR (Jeff Tupper)
+- Fix appending items to sorted wxComboCtrl after creation (Jaakko Salli)
EnsurePopupControl();
const unsigned int count = items.GetCount();
EnsurePopupControl();
const unsigned int count = items.GetCount();
- for( unsigned int i = 0; i < count; ++i, ++pos )
+
+ if ( HasFlag(wxCB_SORT) )
- GetVListBoxComboPopup()->Insert(items[i], pos);
- AssignNewItemClientData(pos, clientData, i, type);
+ int n = pos;
+
+ for ( unsigned int i = 0; i < count; ++i )
+ {
+ int n = GetVListBoxComboPopup()->Append(items[i]);
+ AssignNewItemClientData(n, clientData, i, type);
+ }
+
+ return n;
+ else
+ {
+ for ( unsigned int i = 0; i < count; ++i, ++pos )
+ {
+ GetVListBoxComboPopup()->Insert(items[i], pos);
+ AssignNewItemClientData(pos, clientData, i, type);
+ }
}
void wxOwnerDrawnComboBox::DoSetItemClientData(unsigned int n, void* clientData)
}
void wxOwnerDrawnComboBox::DoSetItemClientData(unsigned int n, void* clientData)