listbox

MATLAB GUI using GUIDE: List Box problem

I'm creating a MATLAB GUI that contains two uicontrol objects: a pushbutton and a listbox. I use the pushbutton to add file names to the listbox. When I run the GUI from the m-file it works fine. The problem occurs only when I run the .fig file itself. Here is the callback code and the error: function add_file_Callback(hObject, eventdat...

C#: How to get the index of the selected item(and the text) in ListBox

I have a listbox(detailed view).My question is how do I get the index of the selected item? Eventually,how to get the text at the index,but that should be easy. ...

[WPF] Testing the scrollbar visibility of a ListBox in code-behind

How to check whether the vertical scrollbar of the listbox is visible in code-behind? I have a listbox with x:Name="listOfItems" and its underlying ScrollViewer's VerticalScrollbarVisibility is set to auto. When the ItemsSource property of the ListBox is set, I want to check whether the verticalScrollbar is visible, but I don't know wh...

WPF ListView Inactive Selection Color and element font color

Hello, I'm able to set ListView Inactive Selection Color I used solution described in following question http://stackoverflow.com/questions/382006/wpf-listview-inactive-selection-color I need to change font color of selected inactive element, is there easy way to accomplish this? Thank You ...

WPF ListBox Selection Color

Sorry if this has been asked before, but I couldn't find a solution to what I'm looking for in the related questions that popped up, or on Google. In my application I'm trying to recreate Words New Document dialog, list on the left of items and on the right an icon with text underneath. In Word it has the orange gradient when you mouse...

What is the maximum amount of data that can be loaded into a Windows form control?

Hello, What is the maximum amount of data I can load onto a form control? My application consumes too much memory and hangs when more than 500,000 records are added to any windows forms control in my experience. Any clues? Thanks ...

WPF Listbox highlight part of ListBoxItem element

Hello, I have a TextBox and ListBox. User can search ListBox elements from TextBox. ListBox is bound to CollectionViewSource. CollectionViewSource has Filter event handler, that filters elements based on text that user enters into TextBox. My requirement is to highlight user entered text within TextBlock of ListBoxItem elements. I ...

WPF/C# Textwrapping in a scrollviewer makes window resizing laggy

Hy. I have got a ListBox with a scrollviewer in it. Each item (40++ items) of the listbox contains a textblock and a small image. When I resize the window, the resizing is very laggy. If I put the textblock visibility of the items to "collapsed", the resizing is okay. My first approach was to set the visibility of each item not display...

Reorder a winforms listbox using drag and drop?

Is this a simple process? I'm only writing a quick hacky UI for an internal tool. I don't want to spend an age on it. ...

Accessing expander from Listbox's groupstyle

Hi, I am using a WPF Listbox which is databound to an ICollectionView to display a list of items that can be filtered. And I am using context menu on the ListBox to group the items in the Listbox. For this, I have defined a groupstyle on the Listbox and it has an expander in it. The code for the same is as below. All the xaml code is in...

getting row data from bindingsource bound to listbox

Hey! I have a listbox like so: list.DataSource = bindingSource; list.DisplayMember = "column_name"; Later I would want to get the selected item's ID from the DataSet with bindingSource.Current. I've done this before with bindingNavigator+bindingSource, Current returns a DataRowView, so I can cast it and I'm done: Int32.Parse(((DataRo...

checked list box

Hi I am new to Access and i am in the process of creating a database for some of our users. I have designed a form where the user name, first and last name etc are inputted. Some of these users work for more than one department which means I need some type of listbox control that allows them to select more than one department when they ...

C# - Adding Button inside ListBox

Hello there. I'm writing an C# App (WinForm) with a ListBox having content added by the user. Now, I could have a ordinary button under the ListBox to remove items, but I would like to have the button right next to the content, thus being inside of the ListBox. Like this: Content 1 | X Content 2 | X ... Content 5 | X The problem is ...

C# - ListBox DataSource property and binding an ArrayList

Hi. I created an ArrayList which contains KeyValuePair<string, string> objects. There are ListBoxes which I would like to bind to that list so that I do not have to fill them by iteration, copying at the same time all the data I have in the above mentioned ArrayList. I am a Delphi programmer and in Delphi I would use the ListView contr...

IPhone like scrolling on Silverlight ListBox

Hi! I need a listbox with IPhone-like functionality for Silverlight. That is, animated scrolling, and click and drag to scroll. Scrolling will continue a bit after the mouse up event based on the "speed" of the dragging. I've search and found no control vendors providing this. So question is how should I build it? I need some hints to g...

WPF: ListBox with WrapPanel, vertical scrolling problem

I have a UserControl (XAML below) that has a ListBox that I want to display images inside a WrapPanel, where images are displayed as many as will fit on one row and then wrap onto the next row etc. It works, except when the ListBox grows higher than the available space in the window, I'm not getting a vertical scrollbar, i.e. the content...

Alternatives to Multiple Listboxes?

The current ASP.NET site that I am working on calls for multiple listboxes, 3 to be exact. The first is for artists, second is for albums, and the last one is for songs. If you select an item from the artist listbox the album listbox will show the albums for that artist and the song listbox will show all the songs from that album im su...

How to display table values to listbox?

How do I display a table value in a listbox control? From this code I got the ProjectCode value from the TeamMember_table: SqlDataAdapter adp = new SqlDataAdapter("select ProjectCode from TeamMember_table where EmpId = '" + eid + "'", conn); I want to display this ProjectCode value in a listBox. Platform: Visual Studio 2008, ASP.NET ...

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

Hi, Is there a way to add item to ListBox (C#), to the beginning of the list without rewriting entire list in a loop? Other way to solve my problem would be to display ListBox in reverse order (last item on the top) but I don't know how to do it. My ListBox control is used as a log viewer where the most recent entry should be on the t...

Multiple Listboxes bound to same List

I am trying to bind several ListBoxs to a List. When a ListBox on one form is updated, I want it to update the other ListBox, too. The problem I am running into is that it doesn't seem to update the view on the ListBox when I update the underlying List. If I look at the ListBox.Items in debug, I can see that all the items I add are th...