m_inSetValue = true;
XtVaSetValues( GetXmText(this),
- XmNvalue, (char *)value.c_str(),
+ XmNvalue, wxConstCast(value.c_str(), char),
NULL);
m_inSetValue = false;
void wxComboBox::SetSelection (int n)
{
-#ifdef LESSTIF_VERSION
+#if wxCHECK_LESSTIF()
XmListSelectPos (GetXmList(this), n + 1, false);
SetValue(GetString(n));
#else
+#if 0
wxXmString str( GetString(n).c_str() );
XmComboBoxSelectItem((Widget) m_mainWidget, str());
-#if 0
- // does it work for Motif
+#endif
XtVaSetValues( (Widget)m_mainWidget,
- XmNselectedPosition, n + 1,
+ XmNselectedPosition, n,
NULL );
#endif
-#endif
}
int wxComboBox::GetSelection (void) const
void wxComboBox::Replace(long from, long to, const wxString& value)
{
XmTextReplace( GetXmText(this), (XmTextPosition)from, (XmTextPosition)to,
- (char*)value.c_str() );
+ wxConstCast(value.c_str(), char) );
}
void wxComboBox::Remove(long from, long to)