compilation fix for wxUniv

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2001-11-20 23:59:46 +00:00
parent 990ff5eceb
commit 8b81a824c4

View File

@ -291,8 +291,8 @@ private:
// other
//----------------------------------------------------------------------
static void SetControlClientData(const wxChar *name,
wxControlWithItems *control);
static void SetListboxClientData(const wxChar *name, wxListBox *control);
static void SetChoiceClientData(const wxChar *name, wxChoice *control);
IMPLEMENT_APP(MyApp)
@ -566,8 +566,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
wxPoint(10,90), wxSize(120,70),
5, choices, wxLB_SORT );
SetControlClientData(wxT("listbox"), m_listbox);
SetControlClientData(wxT("listbox"), m_listboxSorted);
SetListboxClientData(wxT("listbox"), m_listbox);
SetListboxClientData(wxT("listbox"), m_listboxSorted);
m_listbox->SetCursor(*wxCROSS_CURSOR);
#if wxUSE_TOOLTIPS
@ -605,8 +605,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1),
5, choices, wxCB_SORT );
SetControlClientData(wxT("choice"), m_choice);
SetControlClientData(wxT("choice"), m_choiceSorted);
SetChoiceClientData(wxT("choice"), m_choice);
SetChoiceClientData(wxT("choice"), m_choiceSorted);
m_choice->SetSelection(2);
m_choice->SetBackgroundColour( "red" );
@ -1515,8 +1515,20 @@ void MyComboBox::OnKeyUp(wxKeyEvent& event)
event.Skip();
}
static void SetControlClientData(const wxChar *name,
wxControlWithItems *control)
static void SetListboxClientData(const wxChar *name, wxListBox *control)
{
size_t count = control->GetCount();
for ( size_t n = 0; n < count; n++ )
{
wxString s;
s.Printf(wxT("%s client data for '%s'"),
name, control->GetString(n).c_str());
control->SetClientObject(n, new wxStringClientData(s));
}
}
static void SetChoiceClientData(const wxChar *name, wxChoice *control)
{
size_t count = control->GetCount();
for ( size_t n = 0; n < count; n++ )