// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "combobox.h"
#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/setup.h"
#if wxUSE_COMBOBOX
#include "wx/combobox.h"
+#include "wx/arrstr.h"
#ifdef __VMS__
#pragma message disable nosimpint
return TRUE;
}
+bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style,
+ const wxValidator& validator,
+ const wxString& name)
+{
+ wxCArrayString chs(choices);
+ return Create(parent, id, value, pos, size, chs.GetCount(),
+ chs.GetStrings(), style, validator, name);
+}
+
wxComboBox::~wxComboBox()
{
DetachWidget((Widget) m_mainWidget); // Removes event handlers
wxXmString str( item.c_str() );
XmComboBoxAddItem((Widget) m_mainWidget, str(), pos+1);
-#ifndef __VMS
- //FIX me for VMS : no intance for insert function to overload
- m_stringList.Insert(pos, item);
-#endif
+ wxChar* copy = wxStrcpy(new wxChar[item.length() + 1], item.c_str());
+ m_stringList.Insert(pos, copy);
m_noStrings ++;
return pos;