tagged [listbox]

Listview inside of scrollviewer prevents scrollviewer scroll

Listview inside of scrollviewer prevents scrollviewer scroll I have a scrollviewer with a couple listboxes in it. The problem is if a user uses the middle mouse roller to scroll the scrollviewer while...

19 Jan at 22:23

Getting all selected values from an ASP ListBox

Getting all selected values from an ASP ListBox I have an ASP ListBox that has the SelectionMode set to "Multiple". Is there any way of retreiving ALL selected elements and not just the last one? Usin...

20 Aug at 15:13

WPF WrapPanel - all items should have the same width

WPF WrapPanel - all items should have the same width I have a ListBox whose ItemsPanel I have replaces with a WrapPanel. The WrapPanel now hosts the databound ListboxItems. Each item has a variable si...

12 May at 09:49

Sorting a list of items in a list box

Sorting a list of items in a list box I want to get an bunch of items from a list box, add them to an array, sort it, then put it back into a different listbox. Here is what I have came up with: But i...

8 Sep at 11:13

WPF Listbox with touch inertia pulls down entire window

WPF Listbox with touch inertia pulls down entire window I have a full screen WPF application built for a touch monitor, and I have some `Listbox`s on the main screen. When I flick the 'Listbox' it scr...

22 Dec at 02:53

adding a ListBoxItem in a ListBox in C#?

adding a ListBoxItem in a ListBox in C#? I know that: or adds the String in a ListBox, but I want to insert ListBoxItem, how to? previously I learn that simply converts ListBoxItem to String, b

7 Nov at 10:36

ListBox and Datasource - prevent first item from being selected

ListBox and Datasource - prevent first item from being selected Hey. I've got the following code that populates my list box However, after the box is populated, the first item in the list is selected ...

4 Jun at 15:40

Selecting a Textbox Item in a Listbox does not change the selected item of the listbox

Selecting a Textbox Item in a Listbox does not change the selected item of the listbox I Have a wpf Listbox that display's a list of textboxes. When I click on the Textbox the Listbox selection does n...

11 Jan at 06:33

WPF Filter a ListBox

WPF Filter a ListBox I have a `ListBox` with binding to a list of strings. I want to filter the list when I enter text in a `TextBox`. How can I do it? ``` public void ListLoad() { ElementList = new...

27 May at 16:44

Selecting first item in listbox

Selecting first item in listbox A listbox works as an auto-complete within a richtextbox I am populating it with items from a collection. I need it to auto select first item every time listbox populat...

17 Mar at 16:38

Customize PrintDialog Window in WPF

Customize PrintDialog Window in WPF In my WPF application, I am going to print the contents of my ListBox. I want to add a new control to the PrintDialog box to select the number of lines (items) to p...

9 Jul at 19:6

C# : change listbox items color

C# : change listbox items color i am working on program on windows forms I have a listbox and I am validating data I want the correct data be added to the listbox with color green while the invalid da...

1 Aug at 09:12

How do I loop through items in a list box and then remove those item?

How do I loop through items in a list box and then remove those item? I'm getting the error below when trying to loop through a listbox and then remove the item. > List that this enumerator is bound t...

12 Jan at 14:54

How to add item to the beginning of the list in ListBox?

How to add item to the beginning of the list in ListBox? Is there a way to add item to a WinForms ListBox, to the beginning of the list without rewriting entire list in a loop? Other way to solve my p...

12 Nov at 15:54

WPF Listbox auto scroll while dragging

WPF Listbox auto scroll while dragging I have a WPF app that has a `ListBox`. The drag mechanism is already implemented, but when the list is too long and I want to move an item to a position not visi...

17 May at 15:30

How to scroll to bottom of ListBox?

How to scroll to bottom of ListBox? I am using a Winforms ListBox as a small list of events, and want to populate it so that the last event (bottom) is visible. The `SelectionMode` is set to none. The...

9 Jan at 23:40

Move selected items from one listbox to another in C# winform

Move selected items from one listbox to another in C# winform I'm trying to move selected items in list box1 to list box2, and vice versa. I have two buttons, `>>` and `>` the items should move from l...

1 Jan at 00:49

WPF: Binding List to ListBox

WPF: Binding List to ListBox I have a class: ``` public class A : INotifyPropertyChanged { public List bList { get; set; } public void AddB(B b) { bList.Add(b); NotifyPropertyChanged("bL...

wpf Listbox giving columns a header

wpf Listbox giving columns a header I have the following markup (xaml): ```

1 Sep at 00:40

Cancelling ListBox SelectedIndexChange Event

Cancelling ListBox SelectedIndexChange Event Is it possible to cancel the SelectedIndexChange event for a listbox on a winforms application? This seems like such a logical thing to have that I must be...

31 Mar at 20:27

ASP.NET C# ListBox server control will not disable

ASP.NET C# ListBox server control will not disable I have 4 server side ListBox controls. All of them have their Enabled property set to false, yet when rendered they are definitely enabled. They are ...

3 Apr at 02:25

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

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 ...

23 May at 12:26

Getting value of selected item in list box as string

Getting value of selected item in list box as string I am trying to get the value of the selected item in the listbox using the code below, but it is always returning null string. Here I am trying to ...

22 Feb at 05:18

Order of Precedence with methods?

Order of Precedence with methods? Say I have 2 methods. One is an method triggered by the selected index changing in the listbox. The second method helps by clearing all textboxes, setting listbox ind...

How can I set different Tooltip text for each item in a listbox?

How can I set different Tooltip text for each item in a listbox? I have a listbox that is databound to a Collection of objects. The listbox is configured to display an identifier property of each obje...

22 Nov at 13:49