Invalidate the best size after adding an item

to a wxChoice.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2004-12-05 16:56:56 +00:00
parent 265accbe55
commit 9ddf4854df
2 changed files with 18 additions and 0 deletions

View File

@@ -513,7 +513,16 @@ int wxChoice::GtkAddHelper(GtkWidget *menu, int pos, const wxString& item)
ApplyWidgetStyle();
}
else
// The best size of a wxChoice should probably
// be changed everytime the control has been
// changed, but at least after adding an item
// it has to change. Adapted from Matt Ownby.
InvalidateBestSize();
gtk_signal_connect( GTK_OBJECT( menu_item ), "activate",
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );
gtk_signal_connect( GTK_OBJECT( menu_item ), "activate",
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );

View File

@@ -513,7 +513,16 @@ int wxChoice::GtkAddHelper(GtkWidget *menu, int pos, const wxString& item)
ApplyWidgetStyle();
}
else
// The best size of a wxChoice should probably
// be changed everytime the control has been
// changed, but at least after adding an item
// it has to change. Adapted from Matt Ownby.
InvalidateBestSize();
gtk_signal_connect( GTK_OBJECT( menu_item ), "activate",
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );
gtk_signal_connect( GTK_OBJECT( menu_item ), "activate",
GTK_SIGNAL_FUNC(gtk_choice_clicked_callback), (gpointer*)this );