long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition);
- void SetSelection(int sel) ;
+ void SetSelection(int sel);
int GetSelection() const { return m_selection; }
wxString GetStringSelection() const { return m_stringSelection; }
- // get client data associated with selection
- void *GetClientData() const { return m_clientData; }
-
// obsolete function (NB: no need to make it return wxChar, it's untyped)
char *GetSelectionClientData() const { return (char *)m_clientData; }
const wxPoint& WXUNUSED(pos) )
{
m_selection = 0;
- m_clientData = NULL;
- m_stringSelection = wxT("");
m_dialogStyle = style;
{
m_selection = m_listbox->GetSelection();
m_stringSelection = m_listbox->GetStringSelection();
- m_clientData = m_listbox->GetClientData(m_selection);
+ if ( m_listbox->HasClientUntypedData() )
+ SetClientData(m_listbox->GetClientData(m_selection));
EndModal(wxID_OK);
}
{
m_selection = m_listbox->GetSelection();
m_stringSelection = m_listbox->GetStringSelection();
- m_clientData = m_listbox->GetClientData(m_selection);
+ if ( m_listbox->HasClientUntypedData() )
+ SetClientData(m_listbox->GetClientData(m_selection));
EndModal(wxID_OK);
}
gtk_widget_show( GTK_WIDGET(m_list) );
wxSize newSize = size;
- if (newSize.x == -1) newSize.x = 100;
- if (newSize.y == -1) newSize.y = 110;
+ if (newSize.x == -1)
+ newSize.x = 100;
+ if (newSize.y == -1)
+ newSize.y = 110;
SetSize( newSize.x, newSize.y );
if ( style & wxLB_SORT )
// this will change DoAppend() behaviour
m_strings = new wxSortedArrayString;
}
+ else
+ {
+ m_strings = (wxSortedArrayString *)NULL;
+ }
for (int i = 0; i < n; i++)
{
gtk_widget_show( GTK_WIDGET(m_list) );
wxSize newSize = size;
- if (newSize.x == -1) newSize.x = 100;
- if (newSize.y == -1) newSize.y = 110;
+ if (newSize.x == -1)
+ newSize.x = 100;
+ if (newSize.y == -1)
+ newSize.y = 110;
SetSize( newSize.x, newSize.y );
if ( style & wxLB_SORT )
// this will change DoAppend() behaviour
m_strings = new wxSortedArrayString;
}
+ else
+ {
+ m_strings = (wxSortedArrayString *)NULL;
+ }
for (int i = 0; i < n; i++)
{