Questions tagged [listbox]

A graphical user interface element that allows the user to select one or more items from a list.

A list box is a graphical user interface control that allows the user to select one or more items from a list contained within a static, typically multi-line container.

Items are typically selected on click/touch, in a desktop environment depressing either shift or control keys during item selection can allow the selection (or de-selection) of multiple items.

The key feature differentiating a list box from other input controls is the selection of multiple pre-defined items.

11376 questions
323
votes
1 answer

ListBox vs. ListView - how to choose for data binding

I'm considering either a ListBox or a ListView for a WPF application. It seems either supports data binding and item templates. My application has a simple list of items that I intend to be able to search/sort/filter based on user input. The data…
Geoff Cox
  • 6,004
  • 2
  • 25
  • 30
194
votes
16 answers

There is no ListBox.SelectionMode="None", is there another way to disable selection in a listbox?

How do I disable selection in a ListBox?
Shimmy Weitzhandler
  • 92,920
  • 119
  • 388
  • 596
127
votes
2 answers

How can I disable horizontal scrolling in a WPF ListBox?

This seems to be an absurdly simple question but Google and Stack Overflow searches yield nothing. How can I disable horizontal scrolling in a WPF ListBox when items take up more horizontal space than is available in the box?
Martin Doms
  • 8,198
  • 10
  • 40
  • 60
99
votes
3 answers

How to create a listbox in HTML without allowing multiple selection?

I don't have much experience in HTML. I am looking to create a simple listbox, but one of the requirements is to DISALLOW multiple selection. Most of the code for listboxes goes like this -