combobox

Differences between ComboBox and ChoiceBox in JavaFX

烈酒焚心 提交于 2020-01-01 03:58:08
问题 What are the differences between ComboBox and ChoiceBox in JavaFX? I'm not entirely clear on that just from the Javadoc for both classes. At the end of the day, I need a dropdown control that can be repopulated dynamically at runtime (I've got a database on the backend). For all cases in my application, I only need to select one item from the dropdown menus. The user also shouldn't be able to add an option to the dropdown menu from the screens they are visible on. My understanding is that

ComboBox FXML default value

我的梦境 提交于 2019-12-31 12:42:27
问题 How can I set a default value in a ComboBox using FXML? <ComboBox fx:id="cbo_Bacteriologie_Aesculine" prefHeight="21.0" prefWidth="105.0" GridPane.columnIndex="1" GridPane.rowIndex="0"> <items> <FXCollections fx:factory="observableArrayList"> <String fx:value="NVT" /> <String fx:value="Bezig" /> <String fx:value="Positief" /> <String fx:value="Negatief" /> </FXCollections> </items> </ComboBox> I want NVT to be selected by default. I tried adding selected="selected" and such but don't seem to

ComboBox FXML default value

独自空忆成欢 提交于 2019-12-31 12:42:24
问题 How can I set a default value in a ComboBox using FXML? <ComboBox fx:id="cbo_Bacteriologie_Aesculine" prefHeight="21.0" prefWidth="105.0" GridPane.columnIndex="1" GridPane.rowIndex="0"> <items> <FXCollections fx:factory="observableArrayList"> <String fx:value="NVT" /> <String fx:value="Bezig" /> <String fx:value="Positief" /> <String fx:value="Negatief" /> </FXCollections> </items> </ComboBox> I want NVT to be selected by default. I tried adding selected="selected" and such but don't seem to

ExtJS combobox filter

蓝咒 提交于 2019-12-31 05:58:41
问题 I have two comboboxes. The first one is for selecting a region , and the second one is for selecting a province . The values that should appear in the province combobox will be based on the value selected in the region combobox. Region combobox code: xtype: 'combobox', label: 'Region ID', margin: '10 20', flex: 1, valueField: 'regionid', displayField: 'regionname', store: 'RegionStore', minLength: 1, id: 'region_id', reference: 'region_id', name: 'region_id', listeners: { select: function

ExtJS combobox filter

依然范特西╮ 提交于 2019-12-31 05:58:37
问题 I have two comboboxes. The first one is for selecting a region , and the second one is for selecting a province . The values that should appear in the province combobox will be based on the value selected in the region combobox. Region combobox code: xtype: 'combobox', label: 'Region ID', margin: '10 20', flex: 1, valueField: 'regionid', displayField: 'regionname', store: 'RegionStore', minLength: 1, id: 'region_id', reference: 'region_id', name: 'region_id', listeners: { select: function

How can I use filter between comboboxes in java?

十年热恋 提交于 2019-12-31 05:49:06
问题 I have two tables in my database as semester table and course table.There are semesterId,courseId,courseName and Sdepartment(department name)in semester table.Course table has courseId and courseName. I have two comboboxes my jframe.First one is for select a department.Second one is select course.I want to select course as to selected department. How can i call course name in combobox when i select a department? Here my code; public void coursename(){ Session session = HibernateUtil

How to call the OnChange event of “Select” ? (Delphi - WebBrowser)

戏子无情 提交于 2019-12-31 04:05:53
问题 I'm using Delphi and WebBrowser componenet to navigate a html page . the page have a Combobox . is there any way to call the OnChange event ? The ComboBox is like this : <select name="comboname" onchange="Some Javascript codes"> Also , i have used this code : function TFrmMain.SetComboboxValue(WB: TEmbeddedWB; SelectName, ItemName: string): Boolean; var iForms, iFormItems, iSelectItems: Word; FormItem: OleVariant; begin Result := false; for iForms := 0 to WB.OleObject.Document.Forms.length -

DisplayMemberPath gives an error when I try to use it to display the value of my dictionary in a Combo Box

本秂侑毒 提交于 2019-12-31 03:45:10
问题 Here is my Combo Box <ComboBox Height="40" VerticalAlignment="Stretch" x:Name="comboBox1" Grid.Column="1" FontSize="25"> </ComboBox> Here is my C# code var source = new Dictionary<string, double>(); source.Add("Item1", 0.4); source.Add("Item2", 0.3); source.Add("Item3", 0.1); source.Add("Item4", 0.1); var formateDSource = new Dictionary<string, string>(); foreach (var item in source) { formateDSource.Add(string.Format("[{0}, {1}]", item.Key, item.Value), item.Key); } comboBox1.ItemsSource =

Can a combobox present more then one column on its textbox part?

自闭症网瘾萝莉.ら 提交于 2019-12-31 02:49:08
问题 I have a two column list in my combobox and when I choose one of the items in it using the drop down list, it stores (what I see in the textbox part of the combobox) only the value I selected (wether it's the one on the right or left column according to boundcolumn) My question is: Is there a way to store(or present-that is my goal) in the textbox part of the combobox, both of the columns of one row selected? For example: [column1] Daniel [column2] Smith. And in the textbox I want: Daniel

Change the ComboBox's text field when an item is selected from the drop down list?

懵懂的女人 提交于 2019-12-31 01:48:18
问题 I have a ComboBox on a form. The DropDownStyle property of the ComboBox is set to DropDown , so that the user can select an item from the drop down list or type in some text manually. When the user selects an item from the drop down list, I'd like to make some changes to the item's text before it appears in the ComboBox's text field. To use a very simplified example, let's say the drop down list contains items that consist of an ID and a description, like so: 101 Cat 102 Dog 103 Bird When one