listbox

Line seperation / Line break in a listbox

I want to display 2 sets of data on the one list box, for example, I would wont to display the 7 times table and the 8 times table on the same listbox. Here is how I get the first set of data displaying: int awnser = 0; int z; z = int.Parse(textBox1.Text); for (int i = 0; i < 11; i++) { ...

Grails - Multiple Drop Down Boxes Values

Hey I am learning Grails. I've been playing with it for a while but nothing too serious. And let's say I have two drop down boxes, one with the type of animal and the second with the breed. How do I give the second box the values?? For example, If I select dog, it should only show me dog breeds, not the cat ones. Thanks in advance. ...

How to get the ListBoxItem for an item in ListBox on "bind-time"

I have a ListBox with Foo objects, and based on some events I disable/enable the ListBoxItems in the ListBox. Using the ListBox.Items property I find Foo objects, and from what I've understood I need to use the following function to get the ListBoxItem container for the Foo. Correct? foreach (var item in Items) { var lbi = ItemCont...

WP7 Prevent ListBox scrolling

I have a page with two ListBox controls. The page contains a list of items based on the item's category. There is a header for a category, followed by a ListBox containing all items for that category, then another header followed a list of items for that category, etc. The issue I'm having is that each ListBox scrolls independently. I...

When are ListBoxItems created for ListBox?

I have a ListBox that I bind to an ItemsSource, like this: var foos = new ObservableCollection<Foo> { foo1, foo2, foo3 }; var listBox = new ListBox { ItemsSource = _foos }; Now I want to do some operations right away on the ListBoxItems that holds the items, but they don't seem to be created right away. Are they? Is there some event ...

Combo list is not able to write in db

I'm trying to write in db an id from another tableI have a machine table that belongs to owner table. Models: class Machine < ActiveRecord::Base has_many :ipvfours, :dependent => :destroy belongs_to :owners accepts_nested_attributes_for :ipvfours #accepts_nested_attributes_for :owners # some check on fields validates_uniqu...

IsSelected property of ViewModel bound to ListBox, Only FIRST item selection works ?

Hello, I have a MeetingViewModelList bound to a DataGrid. Each MeetingViewModel has a DocumentViewModelList bound to a ListBox within the DataGrid`s DataGridTemplateColumn. The IsSelected property of the DocumentViewModel is bound to the ListBox`s Item property IsSelected. I get no binding errors in the output console. The delete d...

[python]How to add Auto-scroll on insert in Tkinter Listbox?

I'm using a listbox (with scrollbar) for logging: self.listbox_log = Tkinter.Listbox(root, height = 5, width = 0,) self.scrollbar_log = Tkinter.Scrollbar(root,) self.listbox_log.configure(yscrollcommand = self.scrollbar_log.set) self.scrollbar_log.configure(command = self.listbox_log.yview) Now, when I do: self.listbox_log.insert(EN...

asp.net ajax toolkit list search type of plugin in Jquery

Am looking for asp.net Ajax control toolkit List Search type of plugin in JQuery. Ref. http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ListSearch/ListSearch.aspx ...

ASP.NET Listbox not changing index

Hi, My question is probably a simple one to people used to ASP.NET, So here it is: I have a webform in a master page that has a listbox which populates itself with numbers which serve as unique id for my objects. The only problem is that the selected index property of the listbox is always -1 and it automatically deselects itself, no ma...

Tab space in ASP.NET listbox

Hi, Anyone know how to insert tab characters in an ASP.NET listbox? I want to use it so that all my items are lined up because i have two fields on each line a number and a name. In winforms all I have to do is: Listbox.Items.Add(number + "\t" + name); But in ASP.NET Webforms this doesnt work any ideas? ...

how to Save the State of an c# App with powerShell?

Hi! I have a C# program in which the user adds multiple objects an editing Panel. These objects are all represented as a classes. Now I want the user to be able to save the scenario, so it can be loaded again. for that I want to generate a Powershell script of each scénario , but my probléme is how to save diferent objects on Powershel...

How to set ListBox's Scrollbar position?

I'm developing a silverlight 4 application and I often use Listboxes and databinding. What I would like to do is set the scrollbar position to the bottom of my Listbox. Is there a simple way to do this? By the way I've tried this but it doesn't work: COTO_dg.ScrollIntoView(COTO_dg.Items[COTO_dg.Items.Count - 1]); Thank You, Ephismen....

WPF Multi-selection ListBox and composite Items Source Binding

So the situation is this: I have a collection of collections! I have 2 list boxes! ListBox A contains my collection of collections as it's itemsource and supports multiple selection (SelectionMode = Extended) ListBox B needs to get it's itemsource from a composite of all collections selected in ListBox A. Is there a good way to do t...

WPF: Altering a listbox style, smoothening transition between borders

I'm trying to alter the listboxitem style for a silverlight menu. The result I need should look like something like this Is this even possible?, if so: How can i accieve this? The current Xaml code used for the menu: <Style x:Key="LeftMenuStyle" TargetType="ListBoxItem"> <StackPanel Orientation="Horizontal" Mar...

silverlight 4 and ListBox Binding inside the DataTemplate

Hi All, I have a ContentControl which has a DataTemplate defined as the ContentTemplate. In the DataTemplate I have two TextBlocks and a ListBox. I have the two entities(Parent/child) as the data source. What I want is to Bind the Two TextBlocks with the Parent fields and the ListBox with the Child record's list (Customer/Orders). My qu...

listbox example

How can I add a values to a listbox from a textbox each time a space is pressed (split textbox value on space) ...

WPF ListBox that can sort by column

I have a XAML file with only a ListBox. I dynamically create the columns and add the rows. with this code: ListBoxItem l1 = new ListBoxItem(); StackPanel s1 = new StackPanel(); s1.Orientation = Orientation.Horizontal; ContentPresenter ch1 = new ContentPresenter(); ch1.Content = "ICR"; s1.Children.Add(ch1); //just an example I add mor...

Getting the String Text of SelectedItem in Silverlight Listbox (C#)

I have a listbox in a Silverlight C# app which is binded to some data from a database in XAML: <StackPanel> <TextBlock x:Name="ItemText" Text="{Binding Name}" Foreground="White" FontSize="35" TextAlignment="Left"/> <TextBlock x:Name="DetailsText" Text="{Binding Description}" Foreground="Gray" Margin="0,-6,0,3" /> </StackPane...

WPF equivalent of LVS_EX_ONECLICKACTIVATE?

I've got a WPF application with a ListBox in it. For this list box, I'd like to mimic the behaviour of the users control panel (since Windows Vista) -- that is: you single-click on a list item, and it's the same as double-clicking. In Win32, I'd do this by turning on the LVS_EX_ONECLICKACTIVATE style. In WPF, I've attempted to do this ...