listbox

How to get item list from wxpython ListBox

Is there a single method that returns the list of items contained in a wxPython listBox? I cant seem to find anything anywhere in the documentation or anywhere for that matter. All that I can think to do is to set the selection to all of the items and then get the selected items, though seems like an ugly roundabout way of doing some...

Listbox with multiple columns wpf

Hi All, I want to show multiple columns in the list box. I have referred the following link http://stackoverflow.com/questions/908089/using-wrappanel-and-scrollviewer-to-give-a-multi-column-listbox-in-wpf. Problem: I want to scroll the content using repeat button. How to control the listbox scrollbar using button. Code: <ListBox N...

ListBoxDragDropTarget prevents ListBox from filling its parent control

Its extremely easy with the Silverlight Toolkit to enable basic drag and drop. http://silverlightfeeds.com/post/1325/Silverlight_Toolkit_adds_DragDrop_targets.aspx Unfortunately it seems that the wrapper ListBoxDragDropTarget screws up the normal default behavior of a ListBox which is to stretch itself to the parent control - such as a...

Binding ListBox items to a local property and formatting items with bindings

I'm trying to understand binding to local items using XAML. I'll make this a two part question, but both deal with the same basic situation: Say I have a custom user control called MySelector MySelector includes a ListBox called listBox1 MySelector includes a List<string> property called TextList TextList is a read-only property t...

delphi and the displaying of a listbox items

I'm using a listbox to display a simple list of filenames. I also have an edit component that allows me to search those items via a simple: procedure TForm1.Edit1Change(Sender: TObject); const indexStart = -1; var search : array[0..256] of Char; begin if edit1.Text='' then exit; StrPCopy(search, Edit1.Text) ; ListBox1.ItemInde...

listbox containing Custom Controls?

Is it possible to make a listbox that lists a bunch of custom controls? I would assume that you might have to invoke some sort of custom drawing of the child objects, but I do not know how to do that. Can anyone shed some light on this? ...

WPF Merge ItemsSource Lists

I am working with a 2 lists in a backend class. Each list is a different type. Would like to present the user with a single list (containing a union of both lists) of which when an item in this list is selected the item's details appear. The code will look something like: My backend class looks somethings like this public ObservableC...

How to clear WPF listbox ??

Hai am using wpf list box, i cannot able to clear the list when am calling the reload data function, i just want to reload new data at runtime,while page loading it loads the data correctly, when i refresh the new data is fetched in itemsource i can see that in debug mode, but no new data in listbox, old data remains in the list, i cant ...

Sort search results from text file into listbox

Hi scene! what i have is a textbox into which the user types a string. The string will look something like this: G32:04:20:40 Then the user hits the search button. The program must then open a textfile and search for the "nearest" five strings to the one they entered and display them in a listbox. I'll define "nearest string" as much ...

Drawing Items in a Listbox

Assume I have a Listbox with two types of objects in it, either a String, or a custom class called "Label". When I'm drawing the items in the listbox, is there a way to determine whether to cast e as a string or "label"? The functionality I'm looking for is so that the Strings show up as one color, and the Labels show up as another. (P...

Listbox selecteditem problem wpf

Hi All, I am binding dataview to listbox. How to get the selected item. Geetha ...

Overriding DrawItem for ListBox - unselected items are not redrawn

This is a C# desktop application. The DrawStyle property of my ListBox is set to OwnerDrawFixed. The problem: I override DrawItem to draw text in different fonts, and it works. But when I start resizing the form at the runtime, the selected item is drawn correctly, but the rest of them are not redrawn, causing text looking corrupt for u...

Silverlight - Can't get ListBox to bind to my ObservableCollection

I'm trying to make a ListBox that updates to the contents of an ObservableCollection whenever anything in that collection changes, so this is the code I've written for that: xaml: <ListBox x:Name="UserListTest" Height="300" Width="200" ItemsSource="listOfUsers"> <ListBox.ItemTemplate> <DataTemplate> <TextBlock T...

How to get Listbox item from the listbox wpf

Hi All, I want to scroll the listbox which is placed inside the srollviewer according to its selection. ListBoxItem item = (ListBoxItem)(lbTrack.ItemContainerGenerator.ContainerFromItem(lbTrack.Items.CurrentItem)); // ListBoxItem item = (ListBoxItem)(lbTrack.ItemContainerGenerator.ContainerFromItem(lbTrack.SelectedItem)); ...

Remove(unselect) selected items from list box using javascript...

I tried this, document.getElementById('<% = ListBox1.ClientID %>').options.length = 0; what this does is clear my items of my listbox.. I simply want to unselect the selected items.. Any suggestion... ...

ListBox ItemTemplate is fickle with CLR and UserControl data

I wrote a simple UpDown UserControl for my application. I am rendering it in a ListBox so that as UpDown controls get added, they stack up horizontally. My UserControl has one DependencyProperty that corresponds to the number inside of the UpDown control, called NumberProperty. I add multiple UpDown controls to the ListBox via databin...

ListBox template tweak needed for horizontal stretching of listbox items

I am trying to use a DataTemplate for ListBox.ItemTemplate for a simple TODO list. The template for each ListBoxItem is a grid and I want the content for my 2nd column to stretch the remaining width of the listbox. No amount of HorizontalAlignment="Stretch" etc. etc. seems to do the trick and I think I need to modify the template. I've ...

Listbox ScrollIntoView problem wpf

Hi All, I am creating a listbox with itemsource of type dataview. I want to scroll the listbox to praticular item which is not selected. I am using the following code for selected item. Code: Binding listbox: DataView dv = newDt.DefaultView; dv.Sort = "Count Desc"; lbResult.DataContext = dv; To get the row...

Filtered WPF ListBox

I have written a small implementation to filter a listbox based on keyboard input. For an example if the listbox has values "Peter", "Ann" and "Andrew", typing character "A" will filter the list down to "Ann" and "Andrew". I have used the ICollectionView.Filter approach for filtering. However, now I need to highlight the matching charact...

Making columns in a WPF ListBox

Hi, Problem: I have a set of items which have 3 elements: Image Description Numeric Value I want to display these in a ListBox (similar to the way Excel displays emails in the summary view) however, i do not know the width of the description field. If i dont set a hard coded value for the width in the ItemTemplate im using for the...