wxEND_FLAGS( wxListBoxStyle )
-IMPLEMENT_DYNAMIC_CLASS_XTI(wxListBox, wxControl,"wx/listbox.h")
+IMPLEMENT_DYNAMIC_CLASS_XTI(wxListBox, wxControlWithItems,"wx/listbox.h")
wxBEGIN_PROPERTIES_TABLE(wxListBox)
wxEVENT_PROPERTY( Select , wxEVT_COMMAND_LISTBOX_SELECTED , wxCommandEvent )
wxCONSTRUCTOR_4( wxListBox , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size )
#else
-IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControlWithItems)
#endif
/*
}
// now we can compute our best size correctly, so do it if necessary
- SetBestSize(size);
+ SetInitialSize(size);
return true;
}
int wxListBox::DoAppend(const wxString& item)
{
- int index = ListBox_AddString(GetHwnd(), item);
+ int index = ListBox_AddString(GetHwnd(), item.wx_str());
m_noItems++;
#if wxUSE_OWNER_DRAWN
unsigned int i;
for (i = 0; i < m_noItems; i++)
{
- ListBox_AddString(GetHwnd(), choices[i]);
+ ListBox_AddString(GetHwnd(), choices[i].wx_str());
if ( clientData )
{
SetClientData(i, clientData[i]);
if (bCase)
return wxItemContainerImmutable::FindString( s, bCase );
- int pos = ListBox_FindStringExact(GetHwnd(), -1, s);
+ int pos = ListBox_FindStringExact(GetHwnd(), -1, s.wx_str());
if (pos == LB_ERR)
return wxNOT_FOUND;
else
unsigned int nItems = items.GetCount();
for ( unsigned int i = 0; i < nItems; i++ )
{
- int idx = ListBox_InsertString(GetHwnd(), i + pos, items[i]);
+ int idx = ListBox_InsertString(GetHwnd(), i + pos, items[i].wx_str());
#if wxUSE_OWNER_DRAWN
if ( m_windowStyle & wxLB_OWNERDRAW )
if ( n == (m_noItems - 1) )
newN = -1;
- ListBox_InsertString(GetHwnd(), newN, s);
+ ListBox_InsertString(GetHwnd(), newN, s.wx_str());
// restore the client data
if ( oldData )
if ( itemID == (UINT)-1 )
return false;
- long data = ListBox_GetItemData(GetHwnd(), pStruct->itemID);
+ LRESULT data = ListBox_GetItemData(GetHwnd(), pStruct->itemID);
wxCHECK( data && (data != LB_ERR), false );