listbox

How to set multiple selections in ASP.NET ListBox?

I can't find a way to select multiple items in an ASP.NET ListBox in the code behind? Is this something needs to be done in Javascript? ...

How do I change an ASP.NET listbox border from 3d to 1px solid?

By default the listbox in ASP.NET has a 3D border effect. I need to change that to Solid, 1 px, some color. Can this be done using css? Thanks, Atul ...

Multiselect WPF Listbox Make Multiple Selections With a Single Click

Hi, I have a databound multiselect listbox bound to a datatable. When I select a listboxitem I want some other listboxitems in the same listbox to be selected automatically. I want multiple items to be selected with a single click. How can i do that? I can't do it in SelectionChanged event because it leads to calling the same event again...

How do you remove hyperlinks from a Microsoft Word document?

I'm writing a VB Macro to do some processing of documents for my work. The lines of text are searched and the bracketed text is put in a list(box). The problem comes when I want to remove all hyperlinks in the document and then generate new ones (not necessarily in the location of the original hyperlinks) So the problem is How do I re...

How to create a ListBox style which sets the GroupStyle

I have a global style for my WPF listbox and want to customize the GroupStyle. However, this code <Style x:Key="myListBox" TargetType="ListBox"> <!-- ... --> <Setter Property="GroupStyle"> <Setter.Value> <!-- ... --> </Setter.Value> </Setter> </Style> won't compile, because GroupStyle doesn't have a set accessor. ...

How can I make a column in a listbox in WPF the same width for all items?

I have a ListBox with an ItemTemplate consisting of a TextBlock and a ComboBox. The problem is that the width of the text inside the TextBlock is not the same for each item and the ComboBox controls are not aligned. How can I set the TextBlock in the template so all items are the same width, that is the one of the widest? Here is my xam...

How can I make the column widths of a list box in MS-Access2007 automatically size themselves correctly?

Background info: I was handed a "Tool", which was made using MS-Access 2007, and asked to add some things... The tool is basically a collection of options for querying a database. On a form titled CreatedReport there is a listbox that is bound to a table called analyzed which has all of resulting data from the query/queries that ran. The...

Listbox scrollbar doesn't follow selected item (with ICollectionView)

I'm trying to implement the MVVM pattern in WPF. I've followed Jeremy Alles's Very simple MVVM demo application. I have a ListBox that has a binding to an ObservableCollection: <ListBox Name="myListBox" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Persons}"> <ListBox.ItemTemplate> <DataTemplate> ...

Can the DataTemplate of a listbox in silverlight be a collection of lists

Hi I have a an array of observable collections and I want to display all these collections in a single list box. The data in each of these collections are of the same type and they have been separated on the basis of a particular category. So my question is, is it possible for the DataTemplate of a listbox to contain a Listbox? ...

How can i call the below function to populate my access form list control

I need to populate the access form list box from a access table. Below is the code which I copy-pasted on button click event: Public Sub PopulateLBWithData(DBPath As String, _ TableName As String, FieldName As String, _ oListControl As Object,Optional Distinct As Boolean = False, _ Optional OrderBy As String) ''#PURPOSE: Populate a l...

Query regarding dsn string in vba

Below is the code to fill a list box in a VBA application : Private Sub Form_Open(Cancel As Integer) ''#Populate list box control. Dim cnn As ADODB.Connection Dim strSQL As String Dim rst As ADODB.Recordset Dim strList As String On Error GoTo ErrHandler ''#Use DSN to Northwind. ''#Modify connection and connection str...

Double buffered ListBox

I have a CheckedListBox (WinForms) control (which inherits from ListBox; googling shows that the problem is with ListBox) that is anchored to all four sides of its form. When the form is resized, the ListBox has an ugly flicker. I tried inheriting CheckedListBox and setting DoubleBuffered to true in the ctor (this technique works with ...

Export contents of a listbox to a textfile

How can the Windows API be accessed in order to find a ListBox control in an application and export its contents to a text-file or an excel file. Are there any applications (of the type of Spy++) that can accomplish such task? ...

c# How do I select a list box item when I have the value name in a string?

I have a string 'item3' and a listbox with 'item1,item2,item3,item4', how do I select item3 in the list box when I have the item name in a string? Thanks ...

Definine one grid to hold all the items of a ListBox in stead of a grid for each using a DataTemplate

Hi I have a ListBox that is bound to a list of Persons. I want to show the items of the listbox in a grid. I can accomplish this with the code below, but the problem is that with this code each item has its own grid. I want one grid to contain all items so that each column in the grid is automatically scaled to the width of the longest ...

WPF ListBox Button Selected Item

I have a listbox with some textblocks and a button -- in the button's codebehind it calls a method passing the currently selected listbox item, this works great. The issue is that when I select an item and then click the button on another item it doesn't update the "SelectedItem" property -- is there a way Xaml or C# that I can force a b...

WPF ListBox fixed width

I have a ListBox in a PopupControl. Problem is that while scrolling, Popup resizes to fit the actual widest element. How to avoid this resizing and adjust automatically to the widest element in the whole list? I tried to put it in a Grid but without succes. ...

C# - Check datatype of a value via if condtion

I am binding an ArrayList() to a Listbox control and assigning out an Displaymember and Value on data in the Array. My problem is that I Bind on startup but the Array gets filled after a few function calls. I have code on selectedIndexChanged to check the selectedValue but if the ArrayList is empty it returns an object, once it has data ...

Split the width evenly between of two controls that make up a listbox item?

Hi, I'm trying to setup a ListBox so that every item has a textblock and a combobox, split evenly across the width of the listbox but I can't seem to find the magic combination of ColumnDefinition properties to do it. Here's my DataTemplate for the listbox item. I've cleaned it up since it was wrong, anyhow. <DataTemplate x:Key...

MS Access VBA Listbox with row colouring?

Hi there, I'm trying to put together a little list box, populated from a query, that would have the background colour of its rows as different colours depending on a certain status. I've done some googling around the subject and it doesn't seem possible using the standard controls that the Access form designer provides. There are some A...