combobox

Put a “column header” over the ScrollViewer of a WPF ComboBox ControlTemplate

拜拜、爱过 提交于 2020-01-06 12:29:25
问题 here is my sample project updated from this thread: WPF: Refine the look of a grouped ComboBox vs. a grouped DataGrid -sample attached - http://www.sendspace.com/file/ru8hju (VS2010 .Net 4.0 project) My question is now HOW can I add a "column header" like stackpanel horizontal with 2 TextBlocks ADD to my existing ComboBox ControlTemplate ABOVE the ScrollViewer when I have a custom ComboBoxItem stuff and there is the ItemPresenter in the default ComboBox ControlTemplate. Thats my existing

Where is ComboBox popup in visual tree?

狂风中的少年 提交于 2020-01-06 10:54:24
问题 Where in the visual tree can I find the ComboBox popup (the list with the ComboBoxItems)? I have programmatically opened a ComboBox and when watching it in the WPF Tree Visualizer in the debugger I see the following: : ComboBox templateRoot : Grid PART_Popup : Popup toggleButton : ToggleButton templateRoot : Border splitBorder : Border Arrow : Path contentPresenter : ContentPresenter : TextBlock I expected to see a ScrollViewer with some kind of item host (StackPanel?), perhaps where the PART

Default value of Combobox(form control) VBA

余生长醉 提交于 2020-01-06 10:54:14
问题 Hey I have been searching a lot on the internet but I haven't been able to find the solution. I have atleast 10-15 combobox(form control) in my workbook. I want them to display a default value of say "Select type". Now, I have tried doing this using the ".listindex" but then it doesn't allow me to change the value in the combobox(as the default is set permanently). Can someone help? This is what I tried to use With ws(1).shapes("Chill1").controlformat .listindex = 1 End with 回答1: The default

c# Search using ComboBox and Textbox

て烟熏妆下的殇ゞ 提交于 2020-01-06 07:45:51
问题 I have a problem with this code. Every time I type a text in the TextBox this happen. there's an added column and its empty(I want to remove this) public void searchData() { string sql = "Select * from Inventory"; cmd = new OleDbCommand(sql, con); try { con.Open(); cmd.Connection.CreateCommand(); string value = cboFields.Text; switch (value) { case "ID": cmd.CommandText = "Select * from Inventory where ID LIKE @searchKey"; break; case "Quantity": cmd.CommandText = "Select * from Inventory

c# Search using ComboBox and Textbox

懵懂的女人 提交于 2020-01-06 07:45:01
问题 I have a problem with this code. Every time I type a text in the TextBox this happen. there's an added column and its empty(I want to remove this) public void searchData() { string sql = "Select * from Inventory"; cmd = new OleDbCommand(sql, con); try { con.Open(); cmd.Connection.CreateCommand(); string value = cboFields.Text; switch (value) { case "ID": cmd.CommandText = "Select * from Inventory where ID LIKE @searchKey"; break; case "Quantity": cmd.CommandText = "Select * from Inventory

Class Module codes for Change Event of comboboxes

℡╲_俬逩灬. 提交于 2020-01-06 07:26:10
问题 I have a userform where I put 10 rows of comboboxes for 7 columns. Which means I got 70 comboboxes altogether. To ease your understanding, I will refer the first combobox as (1,1) for (row,column). What am I trying to do is, when a user input values on any combobox on Row 1, I want the values to be copied on its adjacent combobox at Row 2. For example, if I select value on (1,3), same value will appear on (2,3). The same thing goes to Row 3 & 4, Row 5 & 6, and so on. This is the code on my

WPF: Refine the look of a grouped ComboBox vs. a grouped DataGrid -sample attached -

不打扰是莪最后的温柔 提交于 2020-01-06 04:34:11
问题 just watch this screenshot I made so you see the difference: I have these requirments to be changed in the ComboBox`s PopUp so it looks like the grouped WPF DataGrid, its only about the Popup-area, do not judge the editable area of the ComboBox or that there is no Header... Important are these things, because I could not change them: ComboBox: (Green Line) The alternating Background of the Item must start at the beginning (Red Line) The TextBlocks within the Border must be aligned Center OR

wpf combobox prevent text changed

陌路散爱 提交于 2020-01-06 04:29:18
问题 is there any way to prevent wpf combobox from changing its text after selection changed? I have a custom control that derives from combobox and I want to be able to set the text manually after selection changed, additionally I cannot prevent the base.OnSelectionChanged from being invoked (this does the trick but it has to stay there as a part of requirements) 回答1: In general the IsEditable and the IsReadOnly properties of ComboBox are used to control the level to which the display Text of the

Kendo combobox.value(x) not working correctly

不羁的心 提交于 2020-01-06 04:00:10
问题 I'm trying to set value of kendo combobox dynamically, but when trying like: var lvl1 = $("#level1Id").data("kendoComboBox"); var lvl2 = $("#level2Id").data("kendoComboBox"); var l2value = lvl2.value(); // save value for later use ... // do something that includes changing lvl2.value lvl2.value(l2value.toString()); // set lvl2.value back to previous the combobox value sets to "Code" field - for example - 2, instead of "Value/Text" field - "corresponding value of l2value code". I understand,

Load colors into comboBox

强颜欢笑 提交于 2020-01-06 03:25:05
问题 I am making a homemade text editor and in it trying to make a control used to change the color of the text, on my tool bar I have a combo box in which I want to be able to load system colors into so that the user may change the color of the selected text. I can not figure out how to populate the combo box with these colors, I have tried variation of things I have found on the internet within my page_loaded event, but can not seem to get it to work. Hope you can help Thanks Beef 回答1: You can