Show that the GTK+ listbox doesn't deselect any item

in MULTIPLE mode when clicked upon.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2005-02-21 22:46:34 +00:00
parent 1a87edf286
commit 1e2cb856c4
3 changed files with 5 additions and 1 deletions

View File

@@ -677,7 +677,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
wxPanel *panel = new wxPanel(m_book); wxPanel *panel = new wxPanel(m_book);
m_listbox = new wxListBox( panel, ID_LISTBOX, m_listbox = new wxListBox( panel, ID_LISTBOX,
wxPoint(10,10), wxSize(120,70), wxPoint(10,10), wxSize(120,70),
5, choices, wxLB_ALWAYS_SB ); 5, choices, wxLB_MULTIPLE /*|wxLB_ALWAYS_SB*/ );
m_listboxSorted = new wxListBox( panel, ID_LISTBOX_SORTED, m_listboxSorted = new wxListBox( panel, ID_LISTBOX_SORTED,
wxPoint(10,90), wxSize(120,70), wxPoint(10,90), wxSize(120,70),
5, choices, wxLB_SORT ); 5, choices, wxLB_SORT );

View File

@@ -233,6 +233,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget,
} }
#endif // wxUSE_CHECKLISTBOX #endif // wxUSE_CHECKLISTBOX
#if 0
if ((gdk_event->state == 0) && if ((gdk_event->state == 0) &&
(((listbox->GetWindowStyleFlag() & wxLB_MULTIPLE) != 0) || (((listbox->GetWindowStyleFlag() & wxLB_MULTIPLE) != 0) ||
((listbox->GetWindowStyleFlag() & wxLB_EXTENDED) != 0)) ) ((listbox->GetWindowStyleFlag() & wxLB_EXTENDED) != 0)) )
@@ -243,6 +244,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget,
return true; return true;
} }
} }
#endif
/* emit wxEVT_COMMAND_LISTBOX_DOUBLECLICKED later */ /* emit wxEVT_COMMAND_LISTBOX_DOUBLECLICKED later */
g_hasDoubleClicked = (gdk_event->type == GDK_2BUTTON_PRESS); g_hasDoubleClicked = (gdk_event->type == GDK_2BUTTON_PRESS);

View File

@@ -233,6 +233,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget,
} }
#endif // wxUSE_CHECKLISTBOX #endif // wxUSE_CHECKLISTBOX
#if 0
if ((gdk_event->state == 0) && if ((gdk_event->state == 0) &&
(((listbox->GetWindowStyleFlag() & wxLB_MULTIPLE) != 0) || (((listbox->GetWindowStyleFlag() & wxLB_MULTIPLE) != 0) ||
((listbox->GetWindowStyleFlag() & wxLB_EXTENDED) != 0)) ) ((listbox->GetWindowStyleFlag() & wxLB_EXTENDED) != 0)) )
@@ -243,6 +244,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget,
return true; return true;
} }
} }
#endif
/* emit wxEVT_COMMAND_LISTBOX_DOUBLECLICKED later */ /* emit wxEVT_COMMAND_LISTBOX_DOUBLECLICKED later */
g_hasDoubleClicked = (gdk_event->type == GDK_2BUTTON_PRESS); g_hasDoubleClicked = (gdk_event->type == GDK_2BUTTON_PRESS);