combobox

Getting the index number of selected comboBox item

I have a combo box setup with 4 items, with indexes ranging from 0 to 3. Later in my code, I need to do a certain event depending on what is selected. To do this I thought about comparing what the index of the selected combo box item is, because integer comparison is faster than strings, right? Can anyone let me know how I can grab the...

How to make 1st item of html drop down box (select element) selectable

I have a standard html drop down box. I want to run js code after the user selected an item without a separate submit button. Onchange event does not fire when the user selects the 1st item (actually the previously selected item) in the select box. How can I make the combo box react to the click even if the previously selected item is...

Wpf Combobox Binding in ListView

Hi i´ve got a problem with the databinding of a combobox in a listview. i have two classes: - Transaction - Substrate the Transaction has a attribute of the Substrate and the Transactiona are saved in a Datebase. At the start of the programm i want to load all Transactions as a list and show them in a ListView. Each possibility of Subst...

WPF command support in ComboBox

I want to have a command on my viewmodel execute on the selectionchanged of my ComboBox. Obviously Combobox does not support executing commands. I have created a new class that inherits from Combox and implements this interface. When I try to view the control (in the designer or in debug) the control doesn't show. I don't get any excep...

WPF ComboBox a better way to format ItemsSource

Morning Guys, I have a few ComboBoxes bound to List of TimeSpan. I am formatting the TimeSpans using IValueConverter and ItemTemplate. I was wondering if there were an easier way to format the TimeSpans. Here's what I'm currently doing. public class TimeSpanConverter : IValueConverter { #region IValueConverter Members public o...

Cancelling change event in HTML ComboBox

Hi All, Please help me. When selected item is changed in html combobox, I want to cancel the selection change in particular items. I have tested the following cases (in combination) but not help. return false from event handler window.event.returnValue = false; window.event.cancelBubble = true; event.preventDefault(); event.stopPropaga...

WPF ComboBox resets selected item when item-source changes

Consider the following XAML: <ComboBox Name="CompanyComboBox" HorizontalAlignment="Stretch" ItemsSource="{Binding Path=GlobalData.Companies}" SelectedValuePath="Id" SelectedValue="{Binding Customer.CompanyId, ValidatesOnDataErrors=True}" DisplayMemberPath="Name" /> GlobalData.Companies is a collection (IEnumerabl...

Windows Mobile 6.1: ComboBox height

Hello, Could anyone tell why does a ComboBox (having the same font settings as a TextBox) look smaller (i.e. does not have the same height) ? The same application looks perfect on Windows Mobile 5. Could this be coped somehow ? Thanks. ...

Textbox with drop down list behaviour using CSS/JavaScript

I'm trying to create a uniform style for a small web form. The problem is that the dropdown list seems to be pretty impossible to style as needed - the browser scroll options etc coming from the OS seemingly. The solution I can see is to manipulate a combobox implementation so that I can use a text box, with the selections managed thr...

Programmatically set ComboBox SelectedItem in WPF (3.5sp1)

I have been confused while setting SelectedItem programmaticaly in wpf applications with Net Framework 3.5 sp1 installed. I have carefully read about hundred posts \topics but still confused(( My xaml: <ComboBox name="cbTheme"> <ComboBoxItem>Sunrise theme</ComboBoxItem> <ComboBoxItem>Sunset theme</ComboBoxItem> </ComboBox> ...

Possible to have more then one labelField in Flex?

I have a combo box that is currently getting its information from a database this seems to be working fine. Now I would like to have content from two fields displaying in the combo box at once. Say First Name & Last Name I've added the information to the query fine but the data displayed in the combo box seems to be controlled by the l...

C# WPF - ComboBox highlighting text colour issue

I have an issue with ComboBox highlighting which shows black text on a blue background, when the text for highlighting should be white. I have examples of ComboBox which use ComboBoxItems where the Content is a string. The combobox in these cases behave as expected - when the combobox is dropped down if you highlight an item it display...

Flex, <mx:Combobox> & XML: get xml node to specify's dataprovider

Hi! I'm trying to set a combobox's dataprovider. I have 2 comboboxes: cb_div and cb_stores. For cb_div, I get to set the data provider correctly with an XML file. Cb_stores' dataprovider is to be set depending on the selected item of cb_div. First, here are my XML files. Data provider for cb_div: <?xml version="1.0" encoding="UTF-8"?>...

How to make a small flash swf with ComboBox in Actionscript 3?

I have a pure Actionscript 3 project, using flash.* libraries, compiles down to about 6k (using mxmlc). Program handles about 1k shapes, a few sprites, a sockets connection, works great (tastes less filling). Now, how would I add a ComboBox control without incurring excessive bloat? More specificially, I would like to keep the size und...

Get different form depending on option selected from drop down box in Microsoft Access

I have a drop down box on the main form with four location options e.g. town, city, country, village. I have four additional forms that I want to link to each of these options so that if the user selects "town", the "town form" opens for them to enter information. Same for the other options. I'm new to Access so will need very precise...

Flex ComboBox user choice reset

To be more descriptive here's a live example: http://interklub.biz/CTPonLine.html In last column there's a ComboBox with some values. When user choose an option in ComboBox from first row and then scroll down the first choice disapears (comes back to default state). There's something more strange, earlier I've tried to apply a one more ...

Is it Possible to set the height smaller than 21 pixels for the System.Windows.Forms.Combobox-Control

Hello Community, i've a problem with the height of the System.Windows.Forms.Combobox-Control. I can't change it. I want to use that to write an own implementation (owner drawn custom control). The following code does not work for me (It's only to try). The height is still 21px! public class TestBox : ComboBox { public TestBox() ...

as3 sorting xml data ?

I have xml data that I can load into my flex app; however, I need to sort it by node. I'm trying to create a combobox or listbox that can display a list of locations sorting them either alphabetically or by the category they are in... I can't get my head around how to format the xml or how to code the flash file to sort according to lo...

When I insert a combobox through VB.NET code how do I make it have an event?

Hi I'm still quite new to VB.NET... I have the following code for a form that has a button (Button1). When I press this button it adds a combobox with some values (it adds a new one underneath each time the button is pushed). How do I set up and event so that when a combobox is changed, a textbox will appear to the right of it? I'm basic...

linking gwt combobox with database

I created a gwt app with a gxt combobox. I have it where it pulls data (a list of names apprx 5000) from the database places it in an array which in turns places it in a store. That is then placed in the combobox using set store, so when a user starts typing in the combo it searches through the store for the name. My question: is this t...