I have a combo box that is bound to a list of strings. The combo box has a check box next to each value so the user can choose values.
I do not want the user to be able to "select" an item. when the combo box drop down is not open I always want a single image to show. So this would look a lot like a button but with a drop down list of check boxes.
I have already done the check boxes and text box so I dont need help with that, but I cant seem to find out how to achieve this.
C#
WPF
Visual Studio 2012
Related
I am making a Window Forms in which I have a combo box where I have inputted all the "search results" I need (attached below) so I was wondering as I have several different inputs(Headache,Weak Immunity and etc.), if it is possible for the picture boxes in my 2nd form to only display pictures relevant to the text in the combo box (Lets say Headache is in the combo box which is in DropDownList style, my 2nd form will show pictures relevant to headaches and not like weak immunity). If I cannot, please let me know what I can do. And I'm using C# in Visual Studio
The first image is my search items
The second image is my form
I have a combo box in one window and a data grid in another, I want to be able to select an item from the combo box and click a button to take me to the next window where it contains a data grid with all the information based on the selected item in the combo box. I was just wondering if this is possible to pass data between windows.
you're searching for a way to passe data from a form to another
there are many ways to do so here is a link to a great response for such a question : passing data between wpf forms
I have a windows program (.NET 4.5) that has a combobox with custom dropdown data. My autocomplete type is set to AppendSuggest, so that the customer can easily type in a name, press tab or enter, and then move on to the next box to fill in.
When the combobox loses focus (goes to another control), the program will parse the text in the textbox. If the name exists in the database, it will attach that person to this instance, otherwise it will create a new person with the name (properly cased) in the database.
Pressing tab allows the autocomplete box to fill in the remaining text and it successfully attaches it to the database. However, if the enter button is pressed or, more importantly, the customer tries to click on a user from the autocomplete drop down list, the textbox simply deletes all text in it and moves on to the next box with nothing in it.
I can't find out how to intercept the data that the user clicks. Ideally, I just want the user to click an item from the dropdown list and have it fill the text in, then parse that text and move on.
I have also checked my code and there is no where in the code that deletes the text from this combobox. It seems to be happening by itself behind the scenes.
Also, I am a somewhat advanced programmer in C#, and although I really haven't worked with autocomplete, I am baffled that I am stumped on something as simple as this.
Okay i swear i looked for this on google before posting.
I tried:
C# check box active area
C# check box check box not text
and a few others.
But i have a check box on top of a button. I want to be able to click the button even when the mouse is over top the check box text area. I want the use to only be able to click the actual box. But when the mouse is over the check box's text, it should click the button.
Thanks all!
I'm assuming this is in WPF / XAML.
Simply add the checkbox to the button without text. Add the text to the button not the checkbox.
That said, I cannot for the world think why this would be a pleasant user experience and would suggest trying to use a different means of getting the information.
So instead of having the checkboxes over top the button, i just created a seperate window that will show with the three options to choose from upon clicking that button.
But i still think it would be cool/neat to have them on top of the button.
I'm trying to make something similar to the intellisense auto-complete box that's available in Visual Studio. The box in VS leaves focus with the text editor, but when text is entered, the box's items filter down. The selected item also remains as it is, with the same styles, even though the control doesn't have focus.
Thanks.
While you don't give it the focus it won't get the focus. About the functionality (up & down keys) you might have to handle that directly in your "text editor": if the auto-complete box is present then call the appropriate methods in your auto-complete box to simulate the "Up & Down" selection and, at the same time, you have avoid your "text editor" to react to this keys.