event.SetInt( combo->GetSelection() );
event.SetString( combo->GetStringSelection() );
event.SetEventObject( combo );
-
+
combo->GetEventHandler()->ProcessEvent( event );
}
gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
{
if (g_isIdle) wxapp_install_idle_handler();
-
+
if (!combo->m_hasVMT) return;
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
m_needParent = TRUE;
m_acceptsFocus = TRUE;
- PreCreation( parent, id, pos, size, style, name );
-
-#if wxUSE_VALIDATORS
- SetValidator( validator );
-#endif
+ if (!PreCreation( parent, pos, size ) ||
+ !CreateBase( parent, id, pos, size, style, validator, name ))
+ {
+ wxFAIL_MSG( _T("wxComboBox creation failed") );
+ return FALSE;
+ }
m_widget = gtk_combo_new();
/* don't send first event, which GTK sends aways when
inserting the first item */
m_alreadySent = TRUE;
-
+
GtkWidget *list_item = gtk_list_item_new_with_label( choices[i].mbc_str() );
m_clientDataList.Append( (wxObject*)NULL );
}
}
- wxFAIL_MSG( _T("wxComboBox: no selection") );
-
return -1;
}
GList *child = list->children;
while (child)
{
- gtk_signal_disconnect_by_func( GTK_OBJECT(child->data),
+ gtk_signal_disconnect_by_func( GTK_OBJECT(child->data),
GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this );
child = child->next;
void wxComboBox::OnSize( wxSizeEvent &event )
{
event.Skip();
-
+
return;
int w = 21;