A few resize bugs removed

combo box now emits EVT_TEXT
  position of pop-up menu can now be set


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-01-26 11:35:26 +00:00
parent 69919241d3
commit 0c77152e0d
11 changed files with 142 additions and 38 deletions

View File

@@ -50,6 +50,20 @@ static void gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox
combo->GetEventHandler()->ProcessEvent(event);
}
//-----------------------------------------------------------------------------
// "changed"
//-----------------------------------------------------------------------------
static void
gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
{
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->m_windowId );
event.SetString( copystring(combo->GetValue()) );
event.SetEventObject( combo );
combo->GetEventHandler()->ProcessEvent( event );
delete[] event.GetString();
}
//-----------------------------------------------------------------------------
// wxComboBox
//-----------------------------------------------------------------------------
@@ -115,6 +129,9 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
gtk_widget_realize( GTK_COMBO(m_widget)->entry );
gtk_widget_realize( GTK_COMBO(m_widget)->button );
gtk_signal_connect( GTK_OBJECT(GTK_COMBO(m_widget)->entry), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
SetBackgroundColour( parent->GetBackgroundColour() );
SetForegroundColour( parent->GetForegroundColour() );