m_notebook->AddPage(panel, "wxChoice", FALSE, Image_Choice);
panel = new wxPanel(m_notebook);
- m_combo = new wxComboBox( panel, ID_COMBO, "This", wxPoint(10,10), wxSize(120,-1), 5, choices );
+ m_combo = new wxComboBox( panel, ID_COMBO, "This", wxPoint(10,10), wxSize(120,-1), 5, choices, wxCB_READONLY );
(void)new wxButton( panel, ID_COMBO_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_COMBO_SEL_STR, "Select 'This'", wxPoint(340,30), wxSize(140,30) );
(void)new wxButton( panel, ID_COMBO_CLEAR, "Clear", wxPoint(180,80), wxSize(140,30) );
gtk_widget_realize( GTK_COMBO(m_widget)->entry );
gtk_widget_realize( GTK_COMBO(m_widget)->button );
+ if (style & wxCB_READONLY)
+ gtk_entry_set_editable( GTK_ENTRY( GTK_COMBO(m_widget)->entry ), FALSE );
+
gtk_signal_connect( GTK_OBJECT(GTK_COMBO(m_widget)->entry), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
wxFrame::OnInternalIdle();
wxMDIChildFrame *active_child_frame = GetActiveChild();
+ bool visible_child_menu = FALSE;
wxNode *node = m_clientWindow->m_children.First();
while (node)
if (child_frame->m_menuBar)
{
if (child_frame == active_child_frame)
+ {
gtk_widget_show( child_frame->m_menuBar->m_widget );
+ visible_child_menu = TRUE;
+ }
else
gtk_widget_hide( child_frame->m_menuBar->m_widget );
}
}
/* show/hide parent menu bar as required */
- if (m_frameMenuBar) m_frameMenuBar->Show( (active_child_frame == NULL) );
+ if (m_frameMenuBar) m_frameMenuBar->Show( !visible_child_menu );
}
void wxMDIParentFrame::GetClientSize(int *width, int *height ) const
s << *pc;
}
- GtkWidget *menuItem = gtk_item_factory_get_item( m_factory, s );
+ GtkWidget *menuItem = gtk_item_factory_get_widget( m_factory, s );
#else
gtk_widget_realize( GTK_COMBO(m_widget)->entry );
gtk_widget_realize( GTK_COMBO(m_widget)->button );
+ if (style & wxCB_READONLY)
+ gtk_entry_set_editable( GTK_ENTRY( GTK_COMBO(m_widget)->entry ), FALSE );
+
gtk_signal_connect( GTK_OBJECT(GTK_COMBO(m_widget)->entry), "changed",
GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
wxFrame::OnInternalIdle();
wxMDIChildFrame *active_child_frame = GetActiveChild();
+ bool visible_child_menu = FALSE;
wxNode *node = m_clientWindow->m_children.First();
while (node)
if (child_frame->m_menuBar)
{
if (child_frame == active_child_frame)
+ {
gtk_widget_show( child_frame->m_menuBar->m_widget );
+ visible_child_menu = TRUE;
+ }
else
gtk_widget_hide( child_frame->m_menuBar->m_widget );
}
}
/* show/hide parent menu bar as required */
- if (m_frameMenuBar) m_frameMenuBar->Show( (active_child_frame == NULL) );
+ if (m_frameMenuBar) m_frameMenuBar->Show( !visible_child_menu );
}
void wxMDIParentFrame::GetClientSize(int *width, int *height ) const
s << *pc;
}
- GtkWidget *menuItem = gtk_item_factory_get_item( m_factory, s );
+ GtkWidget *menuItem = gtk_item_factory_get_widget( m_factory, s );
#else