listbox

How to find a particular position of a selected item in Listbox making the Buttons Enabled in C#?

Hi, I have a list box with items like A B C D E. I also have two buttons Move UP and Move Down with it. i have already made their properties false in the property window (F4). Now i want when a user selects B or all the items below then my Move Up button should get enabled. It should be Disabled for A item In the same way my Move D...

asp.net listbox problem

Hi, foreach (Book b in o.list) { ListBox_Items.Items.Add(b.Title); } After I do this, the titles are now showing up in the listbox. When I make a selection (Single Mode), ListBox_Items (Screen) is highlighting the row selected, but event SelectedIndexChanged is not triggering. protected void ListBox_Items_SelectedIndexChanged(obje...

WPF ListBox with only Button for ItemTemplate

Hi, I am binding a list of items to a ListBox, I need some help with XAML to be able to display a button for each item. I can display a button fine, however the button takes on the length of the content text. I want my button to consume 100% of the ListBox width. I also need to stop the row highlighting for the ListBox, as the button ...

ASP.NET Listbox databound to List of custom objects. Does it keep the actual objects?

Hi All, in ASP.NET, I've bound a listbox control to a List of custom class (consisting of a TimeSpan and Int members). the ToString() function just displays them both as a long string. Now I want to save the modified listbox into the DB again, I need to use the custom class objects again. Does the ListBox save the actual custom object...

Displaying a data-bound StackPanel inside a DataTemplate

I have objects I'm databinding to a ListBox in WPF. Here's what the end result should look like: ------------------------------- | Name | Opt1 | Value1 | | | Opt2 | Value2 | | | Opt3 | Value3 | | | Opt4 | Value4 | ------------------------------- Essentially i've got a DataTemplate for the ov...

(jQuery) Problem processing values in multiselect list box

Hi. I just discovered something that I found odd. I have mys listbox with several store items [item ID, item name]. <select multiple="multiple" size="4" name="storeListBox" id="storeListBox"> <option value="11">item 1</option> <option value="12">item 2</option> <option value="13">item 3</option> <option value="10">item 4</option> </sel...

Can I throw a property changed event for items in a collection bound to my Listbox.ItemSource?

I have a user control that inherits from the ListBox class and displays a list of a custom class I have named DataSeries. Each DataSeries has several dependency properties, like LineColor for example. I can bind my DataSeries collection to the listbox itemsource with no problems, and it displays with the template I have defined (the te...

WPF: Best way of adding "connectors" between items in different listboxes

I have a bunch of usercontrols, each with listboxes in them. I want to make it so that connections between items in these listboxes can be connected between the different controls, and show this visually by drawing lines between them (like in a diagram). That is, item1 in listbox1 is connected to item5 in listbox2 by drawing a line betwe...

Listbox scrollbar thumb changes size when content is variable height

I have a ListBox with many objects displayed, each of which can be a variable height, based on the number of values each object has. See my previous question that was answered here. Many objects are 5-lines high, while others are 1. The scroll bar in the ListBox does not appear to like this, probably due to the virtualization. While you...

How to rotate Items in a WFP Listbox style ?

What i want to do is make a wpf listbox photo album for one my college project and i have come to a point when im really stuck. i simply need to design a data template/ listbox style so it will look like a stack jumbled of photos , Ie the top one being the item under focus (selected item) i drew a quick crude drawing in paint to help...

Scroll bar reset on GridView in ASP.NET

I am using a GridView and ListBox in a page. Gridview contains the data from db bind as DataSource. When clicking on an item in GridView the listbox displays the subitems. My problem occurs when there is a scrollbar in GridView. When I select the last item from the gridview, the subitems are displayed and the scrollbar is going to up. I...

Change color of scrollbar of listbox in ASP.NET

How to change the color of scrollbar of a listbox in ASP.NET? ...

Loop Through Listbox in VB.net or C# and Set Values to Label Text?

I have items in a listbox control that I would like to repeatedly (when it gets to the last one, repeat) loop through and set the text to a label. I'm stuck, please help! ...

how to transfer multiselect listbox items(any orde selected items) to another listbox in .vb?

hi I have three listboxes. the selected items from one listbox(lst1) should be populated in another listbox(lst2) on click of add button and accordingly the third listbox(lst3) needs to be populated with values from db as per the selected values in lst2. theres no selecteditems property i m using ms visual studio2005 similar logic need ...

Passing Listbox Text to Javascript Pop-up Window URL

Hello: Is it possible to pass the contents of a textbox or Listbox into the URL portion of the javascript code window.open(URL)? I have an asp.net listbox control that displays URL values. When ever an end user clicks on another listbox, the URL listbox provides the specific URL. I am trying to pass this URL into the above javascript...

WPF Listbox and Select All

I want to create a simple ListBox and have SelectAll as a context menu item. However it seems that ListBox has some sort of inbuilt handling for SelectAll that I can't get working, but is interfering with my attempt to implement SelectAll. My entire XAML is this: <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.micro...

WPF ListBox Width / MaxWidth

I have a databound ListBox with a DataTemplate setup. The DataTemplate contains a Grid control with two column widths of Auto and *. I would like this column to always fill the ListBoxItem and never extend past the LisBox control to make the horizontal scrollbar visible. I am able to bind the MaxWidth to the DataTemplate's grid using:...

selecting a item from a dictionary via a GUI

I have this situation: Dictionary<Int32, userInfo> users = new Dictionary<Int32, userInfo>(); Where the Int32 is the user id and userInfo contains the name and other details. I want to display a list of names at the form, and allow the person using the program to double click on one to open a window (similar to what happens in MSN mes...

Gui with customizable listbox for Ruby

I need to write a GUI app in Ruby that supports easily changing the text color for items in a listbox (ownerdraw) on Linux. What GUI framework is recommended? ...

Silverlight: retrieving controls nested within a Listbox

hi, i made a listbox that generates dynamic controls such as dropdowns & datepicker. i wanted to retrieve the data within the rows. Normally, in windows forms we commonly index the ...Items[i].FindControl("ControlID") method. How do you do about in XAML? I need to retrieve the changes upon clicking a button. btw, here's a simple view o...