combobox

DataGridViewComboBoxCell : How to set selected value when adding a row?

て烟熏妆下的殇ゞ 提交于 2020-06-25 09:39:08
问题 I have this form that lets user choose a (Code - Product) item from a comboxbox. input quantity and price and Add it to a list. Loading the inventories to the form private List<Inventory> inventories = new Inventory().read_inventory(); Setting the ComboBox with values private void set_drop_down_inventory() { cb_inventory.DisplayMember = "name"; cb_inventory.DataSource = inventories; cb_inventory.ResetText(); cb_inventory.SelectedIndex = -1; } When a user selects a product, it will create a

How to bind Multiple Buttons in Combobox

蓝咒 提交于 2020-06-17 12:58:51
问题 I want to bind a list of buttons in combo boxes. Each Combobox will contains buttons of one category and so on. As referred in attached image. Below is my code: <ItemsControl x:Name="iNumbersList"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal" MaxWidth="930"/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <Button Click="ItemButtonClick" Tag="{Binding

Can't display Data in ComboBox Control of DropDownStyle (DropDownList)

耗尽温柔 提交于 2020-06-09 04:41:47
问题 I have the following requirement, I have a ComboBox Control (DropDownList Style) which user has to select a given value, but can not edit. Then I save it to a Database Table, and it's working fine. (dataRow("it_discount_profile") = Trim(cmbDisProfile.Text)) But when I try to show the same Data in the same ComboBox by retrieving it from the Database, it won't show. (cmbDisProfile.Text = Trim(tempTb.Rows(0).Item("it_discount_profile"))) When I change the ComboBox to "DropDown Style", it works.

Change width of tk Combobox dropdown scrollbar

纵然是瞬间 提交于 2020-06-01 05:14:10
问题 Is it possible to change the width of a tk Combobox scrolldown bar in python 2.7? I'm not talking about the combobox width, but rather the scrollbar width on the combobox that appears when the combobox is active. For example: self.cmbSortOrder=ttk.Combobox(self.frame2, value=l, textvariable=self.SortOrder) self.cmbSortOrder.bind("<<ComboboxSelected>>", self.reloadList) self.cmbSortOrder.pack(side=LEFT) 回答1: you can do it using configure() : This class is used to manipulate the style database.

Debugger Visualizer Winform ToolStripDropDownMenu ComboBox only shows items when first shown

蓝咒 提交于 2020-05-31 03:27:11
问题 I have a Visual Studio debugger visualizer project, and when I add a ToolStripComboBox to a ToolStripDropDownMenu , the combobox's items only appear the first time the form is shown. Like this: The most basic version of the winform code showing the issue is this: public class MyVisualizerDialog : Form { public MyVisualizerDialog() { var toolStripComboBox = new ToolStripComboBox { Items = { "One", "Two", "Three" } }; var toolStripDownDown = new ToolStripDropDownMenu { Items = {

How to get the index of a ComboBox Item under the cursor?

点点圈 提交于 2020-05-17 03:49:07
问题 In a recent project of mine I had a ComboBox with items that exceeded the ComboBox drop-down list length. I wanted to show the items full text in a tool tip. Unfortunately, the .NET framework doesn't provide a built-in solution for this. 回答1: Here's my own solution You can find the full code, a more detailed explanation and an example project on my github. https://github.com/MaxBGitHub/MouseOverItemComboBox Prerequisites The provided code is for the Windows Forms library of the C# .NET 4.5.2

How to get the index of a ComboBox Item under the cursor?

柔情痞子 提交于 2020-05-17 03:47:46
问题 In a recent project of mine I had a ComboBox with items that exceeded the ComboBox drop-down list length. I wanted to show the items full text in a tool tip. Unfortunately, the .NET framework doesn't provide a built-in solution for this. 回答1: Here's my own solution You can find the full code, a more detailed explanation and an example project on my github. https://github.com/MaxBGitHub/MouseOverItemComboBox Prerequisites The provided code is for the Windows Forms library of the C# .NET 4.5.2

How to get the index of a ComboBox Item under the cursor?

我与影子孤独终老i 提交于 2020-05-17 03:46:49
问题 In a recent project of mine I had a ComboBox with items that exceeded the ComboBox drop-down list length. I wanted to show the items full text in a tool tip. Unfortunately, the .NET framework doesn't provide a built-in solution for this. 回答1: Here's my own solution You can find the full code, a more detailed explanation and an example project on my github. https://github.com/MaxBGitHub/MouseOverItemComboBox Prerequisites The provided code is for the Windows Forms library of the C# .NET 4.5.2

Gray out items in a Combo Box list after use so users cannot select them

回眸只為那壹抹淺笑 提交于 2020-05-16 03:15:49
问题 I have a project that I am working on for hardware deployment at new locations. I have a userform combo box with a list of IP addresses that will be assigned to certain hardware items(i.e. credit card machines). I am trying to find a way where once one of the IP addresses is selected for use, that the item in the combobox list is either removed or grayed out and the user cannot reuse. But if for some reason the IP comes back available, that the item is now available for use in the list. The

Vaadin14 Tooltip on Combobox Selection Mouseover

拥有回忆 提交于 2020-05-15 08:16:05
问题 I'm using Vaadin 14 + Java. I have a combobox with an enum as possible select items. I want to display the enum in the combobox as possible selects, but I want to show the longer attribute "name" on mouseover / tooltip. I saw that there has been the same question for older versions of Vaadin (and there was no solution apparently) and was wondering if there is an option to do that by now. ComboBox ComboBox<MyEnum> cb = new ComboBox<>(); cb.setLabel("MyComboBox"); cb.setItems(MyEnum.values());