virtual wxString GetString(unsigned int n) const;
virtual void SetString(unsigned int n, const wxString& string);
+ virtual void SetColumns(int n=1);
+ virtual int GetColumns() const;
+
virtual void DisableEvents();
virtual void EnableEvents();
/**
Gets the number of columns in this choice item.
- @remarks This is implemented for Motif only and always returns 1 for
- the other platforms.
+ @remarks This is implemented for GTK and Motif only and always
+ returns 1 for the other platforms.
*/
int GetColumns() const;
@param n
Number of columns.
- @remarks This is implemented for Motif only and doesn’t do anything
- under other platforms.
+ @remarks This is implemented for GTK and Motif only and doesn’t do
+ anything under other platforms.
*/
void SetColumns(int n = 1);
};
EnableEvents();
}
+void wxChoice::SetColumns(int n)
+{
+ gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(m_widget), n);
+}
+
+int wxChoice::GetColumns() const
+{
+ // gtk_combo_box_get_wrap_width() was added in gtk 2.6
+ gint intval;
+ g_object_get(G_OBJECT(m_widget), "wrap-width", &intval, NULL);
+ return intval;
+}
+
+
void wxChoice::DisableEvents()
{
g_signal_handlers_block_by_func(m_widget,