listbox

WPF: Disable ListBox, but enable scrolling

Been banging my head against this all morning. Basically, I have a listbox, and I want to keep people from changing the selection during a long running process, but allow them to still scroll. Solution: All the answers were good, I went with swallowing mouse events since that was the most straight forward. I wired PreviewMouseDown and...

Selecting items in multi-select listbox from delimited database string field

I'm trying to build an "edit" page for a database record that can be edited and saved back to the database. One of the fields will be a multi-select listbox that will need to highlight the appropriate list items in a hard-coded list when loaded. Using C#, how do I populate a multi-select listbox -- with the appropriate items selected -...

Smooth scroll in Windows Forms ListBox

Is there a way to enable smooth scroll for ListBox class in Windows Forms framework? (I'm using C# and .NET framework 2.0). ...

Using HTML for Listbox items

Hello everyone, I was wondering if there was a way of using HTML for the content of my ASP:Listbox items instead of plain text? The reason I ask is because I'd like to do some extra formatting on each item in the list. Not just font changes, but perhaps icons alongside the text or table rows to divide up each list item. I'm vaguely awa...

limit selections in a listbox in vb.net

Hi all, I am creating a web control in vb.net that contains a list box. I know that I am able to choose a selection mode of Single or Multiple, but I am interested in limiting a Multiple selection to a predetermined size. For example preventing a user from selecting more than 3 items. I have tried adding a Validator to the list box, w...

Maintain scroll position in listboxes in updatepanels, NOT the page

I have a listbox inside an update panel. When I scroll down and select an item, it scrolls back to the top of the listbox. I heard that the dom does not keep track of the scroll position on a postback. Does anyone have a solution/example on how to solve this? Thanks, XaiSoft ...

Generate a comma delimited string from items in a HTML List Box (multiple select) with Javascript

So if you have a html List Box, also called a multiple select, and you want to generate a comma delimited string that lists all the values in that List Box you can you can do that with the following example. The list_to_string() js function is the only important thing here. You can play with this page at http://josh.gourneau.com/sandbox...

How to show Selected treeview node's attribute & values in listbox & textbox respectively using C#?

Hi, I have to create a project in C# in which i have to create a XML Tree View, select a xml file from hard drive(System) it is displayed as Tree View on winform. When a user selects a particular node/element in the tree view,its attributes and values have to be displayed in list box and text box respectively. Till now i have done a pa...

Identifying a button in a templated ListBox.

I have a ListBox that has a custom DataTemplate assigned to it, so that it can correctly display it's content - a custom "Accessory" (which consists of three string properties) object per row. Additionally, there is a button on each row. That button should trigger an event that adds the selected accessory to a MemoryList. Here is the Dat...

Which GUI is similar to listbox on iphone?

I'm trying to move a former app from windows mobile to iphone. Any ideas which GUI in Interface Builder has the similar function as listbox? ...

How can I get multibinding to work in XAML ListBox?

The following shows me 3x "MultiTest.Model.Customers" in the ListBox (one for each record it should display). What do I need to change in order for it to output the contents of the fields instead? <Window.Resources> <Style TargetType="{x:Type ListBoxItem}"> <Setter Property="ContentTemplate" > <Setter.Value> ...

Windows Forms listbox is overflowing when there are too many items to scroll.

Hi, I am building an indexer application based on a suffix tree, that enables me to index whole documents and search strings, substrings, etc, extremely fast. What I'm doing is entering a string in a textbox, pressing a button, and running a function that queries the suffixtree and adds the positions of all occurences of the string to a...

ASP.NET Listboxes to update data

Hi, I'm designing an ASP.NET screen which configures what screens are relevant for a particular type of record. For example a car record will have access to the Ford and Ferrari pages. I'm displaying a listbox on the left with all available items, and a listbox on the right with currently selected items. Two arrow icons allow you to move...

Using Firefox XUL, is is possible to eliminate the listbox border with a style?

I have the following XUL fragment, which works fine, but puts a 1 pixel border around the entire listbox. I've tried a number of CSS styles, but cannot eliminate the border. Any ideas? <listbox> <listhead> <listheader id="adj_lh_1" label = "one"/> <listheader id="adj_lh_2" label = "two"/> </listhead> <listcols> <listcol fle...

Draw custom element between listbox items

I want to draw custom elements (like an empty square> between the items of a listbox, to indicate that users can insert/drop items from another listbox between other items. How can I do this? I have some rather hacky solution for this, but I hope there is an easier way to do this. One of the ideas is to use different DataTemplates for ...

WPF: Sizing images inside grid and listbox

I have a ListBox with horizontal scrolling, and each item consists of a two row grid. The first row contains an image, and the second row a border used to render a reflection of the first. (Yeah, yeah. I know. Yet another coverflow attempt...) I need some help with the sizing of the images. If I don't specify any size, it will render th...

WPF: Remove dotted border around focused item in styled listbox

I have a horizontal listbox with a custom controlIemplate. The selected item gets a dotted frame when focused. Anyone know how to get rid of it? ...

WPF: Listbox, centering selected item

Is it possible to always keep selected item in the middle of a listbox? If the user selects an item, I want to scroll so that the newly selected item is in the middle. I guess it want be possible for the 'edge cases' (the first and last few items), but that's ok. ...

Referencing controls in a WPF DataTemplate

In a WPF page that I'm designing for my church, I have two ListBox controls bound to the results of two Linq-to-Entities queries: the first listbox/query contains all the folks who haven't yet pledged for the year, the second listbox/query contains all the folks who have pledged (and their associated pledges). Specifically: var familie...

Listbox item foreground problem

I am facing a problem with one of my XBAP (WPF Browser application) projects: Here I have two list boxes: One a simple list containing text content Second one containing an expander as each item: Now when I click on the item in the first listbox (on the left side), the foreground changes to white and then changes back to black if ...