SetValidator( validator );
m_widget = gtk_scrolled_window_new( (GtkAdjustment*) NULL, (GtkAdjustment*) NULL );
- gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
+ if (style & wxLB_ALWAYS_SB)
+ {
+ gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS );
+ }
+ else
+ {
+ gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
+ }
m_list = GTK_LIST( gtk_list_new() );
gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_list) );
#endif
-#ifdef __WXDEBUG__
- debug_focus_in( m_widget, "wxListBox::m_widget", name );
-
- debug_focus_in( GTK_WIDGET(m_list), "wxListBox::m_list", name );
-
- GtkScrolledWindow *s_window = GTK_SCROLLED_WINDOW(m_widget);
-
- debug_focus_in( s_window->hscrollbar, "wxWindow::hsrcollbar", name );
- debug_focus_in( s_window->vscrollbar, "wxWindow::vsrcollbar", name );
-
-#ifdef NEW_GTK_SCROLL_CODE
- GtkViewport *viewport = GTK_VIEWPORT( GTK_BIN(s_window)->child );
-#else
- GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport);
-#endif
-
- debug_focus_in( GTK_WIDGET(viewport), "wxWindow::viewport", name );
-#endif
-
gtk_widget_show( GTK_WIDGET(m_list) );
wxSize newSize = size;
list_item = gtk_list_item_new_with_label( str );
-#ifdef __WXDEBUG__
- debug_focus_in( list_item, "wxListBox::list_item", name );
-#endif
-
gtk_container_add( GTK_CONTAINER(m_list), list_item );
gtk_signal_connect( GTK_OBJECT(list_item), "select",