combobox

How to make the Combobox item list dynamic?

一个人想着一个人 提交于 2021-02-08 10:12:53
问题 I am using a 'Generate' button on my worksheet. When I click on the button, a popup (form) come, which contains two comboboxes. Basis the selection in the first combobox, the second combobox option list is populated. For the first combobox, when I hardcode the item values it works fine. The form code is as follows: Private Sub UserForm_Initialize() With ComboBox_DL .AddItem "DL1" .AddItem "DL2" End With End Sub I tried to make this item list dynamic by fetching the combobox item values from a

How to make the Combobox item list dynamic?

独自空忆成欢 提交于 2021-02-08 10:10:46
问题 I am using a 'Generate' button on my worksheet. When I click on the button, a popup (form) come, which contains two comboboxes. Basis the selection in the first combobox, the second combobox option list is populated. For the first combobox, when I hardcode the item values it works fine. The form code is as follows: Private Sub UserForm_Initialize() With ComboBox_DL .AddItem "DL1" .AddItem "DL2" End With End Sub I tried to make this item list dynamic by fetching the combobox item values from a

How do I bind a WPF combo box to a different list when the dropdown is open?

∥☆過路亽.° 提交于 2021-02-08 10:10:26
问题 I have several combo boxes in a Scheduling module that all have dropdown lists based on an "Active" field. public class Project { public int ProjectID { get; set; } public int ProjectTitle { get; set; } public bool Active { get; set; } } <ComboBox Name="ProjectComboBox" ItemsSource="{Binding AllProjects}" SelectedItem="{Binding Project, Mode=TwoWay}"> </ComboBox> The calendar's editing form must always display legacy information in its combo boxes, even if a particular item in a combo list

How do I bind a WPF combo box to a different list when the dropdown is open?

為{幸葍}努か 提交于 2021-02-08 10:06:33
问题 I have several combo boxes in a Scheduling module that all have dropdown lists based on an "Active" field. public class Project { public int ProjectID { get; set; } public int ProjectTitle { get; set; } public bool Active { get; set; } } <ComboBox Name="ProjectComboBox" ItemsSource="{Binding AllProjects}" SelectedItem="{Binding Project, Mode=TwoWay}"> </ComboBox> The calendar's editing form must always display legacy information in its combo boxes, even if a particular item in a combo list

How to disable specific items of combobox programmatically by condition in wpf c#

大憨熊 提交于 2021-02-08 09:38:11
问题 I want to disable some specific items of combobox conditionally. For Example, I have two comboboxes (combobox1,combobox2), I want to disable some specific items of combobox2 (not to remove, just want to disable) according to selected item of combobox1. My xaml codes are like that: <Grid> <ComboBox x:Name="combobox1" HorizontalAlignment="Left" Margin="142,99,0,0" VerticalAlignment="Top" Width="319"> <ComboBoxItem>Choice1</ComboBoxItem> <ComboBoxItem>Choice2</ComboBoxItem> <ComboBoxItem>Choice3

Detect mouse click on SELECTION Editable ComboBox JavaFX

Deadly 提交于 2021-02-08 07:32:45
问题 The question may seem pretty easy at first, but I've already had troubles with it for a few days. So, my problem is that I would like to detect mouse click AND the selection when the ComboBox selection is open and the mouse click is made to choose the option. So, what it should do is detect the MOUSE CLICK on the selection and also get the selected value as well: PS: The code for my ComboBox can be seen here: Select JavaFX Editable Combobox text on click Feel free to ask additional questions.

How to make multiple select drop-downs using same options but disallow same-option selection per drop-down (without reloading page)?

戏子无情 提交于 2021-02-08 07:18:48
问题 I have a PHP script with multiple <select> inputs. The value of these <select> dropdowns are fetched from the same database table. <tr> <td><div align="right">Nama Penguji</div></td> <td>:</td> <td> <select name="nama_penguji" id="nama_penguji"> <option value="-">------------ Penguji -----------</option> <?php $myslq3 = "SELECT * FROM penguji ORDER BY id"; $myqry3 = mysql_query($myslq3) or die ("Gagal Query".mysql_error()); while ($mydata3 = mysql_fetch_array($myqry3)) { echo "<option value='

WPF DataGrid: How do I access a ComboBox in a specific row of a DataGridTemplateColumn?

℡╲_俬逩灬. 提交于 2021-02-08 03:42:25
问题 My app correctly populates a DataGrid column with ComboBoxes, using the following XAML code: <DataGridTemplateColumn Header="Thickness"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <ComboBox ItemsSource="{Binding SteelThickness, RelativeSource={RelativeSource AncestorType=Window}}" SelectedItem="{Binding BottomPlateThickness, UpdateSourceTrigger=PropertyChanged}" SelectionChanged="ComboBox_SelectionChanged" /> </DataTemplate> </DataGridTemplateColumn.CellTemplate> <

Java fx editable combobox with objects

寵の児 提交于 2021-02-07 20:50:31
问题 I am just starting to learn Java Fx. I have a combo box filled with objects. I dealt with toString() method, and I can see that name I wanted to display on the screen. But now I would like to make it editable, that user will enter its own text, and ComboBox will create a new object and put that text into the correct field. I know that problem is in converter FromString or ToString, but I cannot deal with it. package mnet; import javafx.application.Application; import javafx.scene.control

Java fx editable combobox with objects

泪湿孤枕 提交于 2021-02-07 20:46:29
问题 I am just starting to learn Java Fx. I have a combo box filled with objects. I dealt with toString() method, and I can see that name I wanted to display on the screen. But now I would like to make it editable, that user will enter its own text, and ComboBox will create a new object and put that text into the correct field. I know that problem is in converter FromString or ToString, but I cannot deal with it. package mnet; import javafx.application.Application; import javafx.scene.control