Single-selection list.
@style{wxLB_MULTIPLE}
Multiple-selection list: the user can toggle multiple items on and
- off.
+ off. This is the same as wxLB_EXTENDED in wxGTK2 port.
@style{wxLB_EXTENDED}
- Extended-selection list: the user can select multiple items using
- the SHIFT key and the mouse or special key combinations.
+ Extended-selection list: the user can extend the selection by using
+ @c SHIFT or @c CTRL keys together with the cursor movement keys or
+ the mouse.
@style{wxLB_HSCROLL}
Create horizontal scrollbar if contents are too wide (Windows only).
@style{wxLB_ALWAYS_SB}
{
if (g_blockEventsOnDrag) return;
- if (listbox->HasFlag(wxLB_MULTIPLE) || listbox->HasFlag(wxLB_EXTENDED))
+ if (listbox->HasFlag(wxLB_MULTIPLE | wxLB_EXTENDED))
{
listbox->CalcAndSendEvent();
}
- else
+ else // single selection
{
wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() );
event.SetEventObject( listbox );
gtk_tree_view_set_enable_search(m_treeview, FALSE);
GtkSelectionMode mode;
- if (style & wxLB_MULTIPLE)
+ // GTK_SELECTION_EXTENDED is a deprecated synonym for GTK_SELECTION_MULTIPLE
+ if ( style & (wxLB_MULTIPLE | wxLB_EXTENDED) )
{
mode = GTK_SELECTION_MULTIPLE;
}
- else if (style & wxLB_EXTENDED)
- {
- mode = GTK_SELECTION_EXTENDED;
- }
- else
+ else // no multi-selection flags specified
{
- // if style was 0 set single mode
m_windowStyle |= wxLB_SINGLE;
mode = GTK_SELECTION_SINGLE;
}