combobox

Multiple choice on WinForms

What's the best way of implementing a multiple choice option in Windows Forms? I want to enforce a single selection from a list, starting with a default value. It seems like a ComboBox would be a good choice, but is there a way to specify a non-blank default value? I could just set it in the code at some appropriate initialisation point...

Context Menu Resets ComboBox's SelectedIndex

I have a ContextMenu that is displayed after a user right clicks on a ComboBox. When the user selects an item in the context menu, a form is brought up using the ShowDialog() method. If frmOptions.ShowDialog() = Windows.Forms.DialogResult.Cancel Then LoadComboBoxes() End If When that form is closed, I refresh all the...

Programmatically change combobox

I need to update a combobox with a new value so it changes the reflected text in it. The cleanest way to do this is after the combobox has been initialised and with a message. So I am trying to craft a postmessage to the hwnd that contains the combobox. So if I want to send a message to it, changing the currently selected item to the n...

Binding a form combo box in Access 2007

I've created an Access 2007 form that displays, for example, Products from a Product table. One of the fields in the Product table is a CategoryID that corresponds to this product's parent category. In the form, the CategoryID needs to be represented as a combo box that is bound to the Category table. The idea here is pretty straightf...

Datagridview virtual model combobox

how can you dynamically add items to a combobox using the datagridview virtual mode? ...

How to update a Tix.ComboBox's text?

I have a Tix.ComboBox with an editable text field. How do I force the variable holding the value for the text to update? Let me give a more concrete explanation. I have a combo box and a button. When I click the button, it pops up a message box with the value of the combo box. Let's say the combo box text field currently has the value "...

Hiding the header on an Infragistics Winform UltraCombo

I've gone through just about every property I can think of, but haven't found a simple way to hide the header on a winform UltraCombo control from Infragistics. Headers make sense when I have multiple visible columns and whatnot, but sometimes it would be nice to hide it. To give a simple example, let's say I have a combobox that displ...

On a WPF ComboBox, is it possible to set a different Foreground color for the textbox and the popup?

Basically my problem stems from a desire to have the textbox portion be white, and the drop down to be black. When I set the text to white, the drop down appears as I want it, but the text in the textbox itself is hardly readable. Setting the Foreground to black makes the drop down unreadable. Is there a good way to handle this? I am st...

ASP.NET Image Listbox

I want to display a list of images (instead of text) for the user to choose from. The control is databound (the URLs come from the database) Instead of the typical vertical scroll bar in a listbox, I want this box to be horizontal. I'm looking for an ASP.NET server control similar to this: http://www.infragistics.com/dotnet/netadvantage/...

Dynamicaly populating a combobox with values from a Map based on what's selected in another combobox

Ok, here's one for the Java/JavaScript gurus: In my app, one of the controllers passes a TreeMap to it's JSP. This map has car manufacturer's names as keys and Lists of Car objects as values. These Car objects are simple beans containing the car's name, id, year of production etc. So, the map looks something like this (this is just an e...

Readonly ComboBox in WinForms

I'm writing a GUI in C#, Visual Studio 2008, using the Designer and WinForms. I've got a ComboBox control, and I'd like it to only allow to select from the provided options and not to accept a user-entered string. It doesn't appear to have a ReadOnly property, and disabling it hinders the readability of the control (as well as disallow...

Swing: Is there a way to differentiate between a user-caused ItemEvent and an application-caused one?

I'm working with a combobox in a Swing-based application, and I'm having a hard time figuring out what to do to differentiate between an ItemEvent that is generated from a user event vs one caused by the application. For instance, Lets say I have a combobox, 'combo' and I'm listening for itemStateChanged events with my ItemListener, 'l...

Flex : Filter a datagrid using a combobox value that is contained in a datafield

I have a filter in a combobox with a number of entries. Instead of filtering the datagrid with an exact match, I would like to take the selected value and only display records where the selected value is contained in the datafield. For example: the user selects a value of "New" and the datagrid displays records where the contents of the ...

Display an invalid default value in a DataGridViewComboBoxColumn

I have a DataGridViewComboBoxColumn in a DataGridView in a windows application. The user can change settings elsewhere to potentially invalidate a selection in a DataGridViewComboBoxColumn. I have a requirement to retain/display the invalid item while only leaving valid items selectable in the list. Without correcting the selection an...

Clearing the default empty value in a Winform Combobox of type: DropDownList

How do I go about making the default value of the combobox as the first item in the array. ...

Professional jQuery based Combobox control?

Are there any professional Combobox controls (dropdown list with autosuggestion) based on the jQuery library? It should be able to handle large datasets and have some skinning options. A multi-column result list would be great too. I'm working with ASP.NET, but it's a not a problem if I had to write a wrapper for it. I'm already usin...

How to insert 'Empty' field in ComboBox bound to DataTable

This is frustrating, as I am sure I have done this before without issue. I have a combo box on a WinForms app in which an item may be selected, but it is not mandatory. I therefore need an 'Empty' first item to indicate that no value has been set. The combo box is bound to a DataTable being returned from a stored procedure (I offer no ...

How to make a ComboBox column with two data sources (for DataGridView)

The data sources have the same structure, but different data. One would be used for rows that are saved (view mode), and the other one would be for rows that are being added or edited (edit/new rows). How can that be acomplished? I have a standard foreign key column that references a standard lookup table which has an ID, Name and Activ...

How to load string of array in to combobox faster in MFC?

I have an array of 1000 strings how to load them in to combo box faster like kind of dumping in to rather than iterating it? And to copy the combo box data to some 10 other combo box? ...

WPF ComboBox binding not working as expected.

I want my WPF ComboBox's ItemsSource property to be bound to MyListObject's MyList property. The problem is that when I update the MyList property in code, the WPF ComboBox is not reflecting the update. I am raising the PropertyChanged event after I perform the update, and I thought WPF was supposed to automatically respond by updating...