Drop down list menu - c#

Hi guys i want to make a drop down menu like that on a picture.
But i cant seem to do it. i tried many ways like combo box and drop down buttons but it does not look like that one in the picture. Ill be thankful to anyone who could help me. thanks
this is the picture https://i.stack.imgur.com/1ma28.png

It seems that your are looking for a MenuStrip to add to your form, for more details see the following article: http://www.homeandlearn.co.uk/csharp/csharp_s4p1.html

Related

Filter ComboBox when typing first letters?

Is it possible to filter results of a ComboBox when the user types the first few letters into a TextBox?
I've tried googling, cant seem to find it. Not sure if I'm looking for the wrong thing, but figured I've had some good help on here so far :)
What you are looking for is a WPF Incremental Combo Box
See this:
Automatically Filtering a ComboBox in WPF
http://weblogs.asp.net/okloeten/archive/2007/11/12/5088649.aspx

Devexpress grid details grid with a bar

I'm trying to figure out how to implement master-detail relationships between 2 tables in order to have a grid with grid details, just like this example
Now I got the same result as shown in the above link, but now I want to add a button 'Add' in order to add new records but it doesn't seem so easy.
I tried to create a control that contains a grid and a bar with buttons 'add' and 'edit' and create a relationship between it and the main grid but that didn't work either ..
Can anyone give me a hint how to do this ? Any help is appreciated :)
Have you tried using the Data Navigator?
If I've understood you right, you want to have a master detail grid, and above it, a bar that contain buttons to Add and Edit your items. If so, You can do the following :
If you wish to put your bar in the top of the form, use a bar Manager.
Otherwise : Try a Panel control, and in it, you put a StandAloneBarDockControl (enable you to put your bar in other places than the top of the form), and than, use the bar manager and the xtragrid controls.
Have you tried using the Embedded Navigator? Or is that no solution for you? Further you can build in a ContextMenuStrip. It is not exactly what you searching for but maybe it helps.

Selecting contents of Label Control

I have what I consider to be a pretty unique problem here, and no idea how to implement. From what I've seen, there is no documentation, tutorials, samples and/or articles on this. I've spent weeks researching, with nothing to show.
The problem:
I need the user to be able to select the contents of a Label Control at runtime, and edit it.
If this can be done by extending the existing Label control, great! Or, if this requires a whole new Label Control to be created, fine. So be it.
Using a TextBox is not an option I'm afraid.
Any help at all is greatly appreciated!
Thank you,
jase
If it's just because a look & feel issue you can make a TextBox control look the same as a label would looks like (just guessing since I can't imagine any reason for not using a TextBox).
Could you pop up a window with a text box in it and then have them edit it there, then set the text property of the label based on the edited text box or do you need to edit it in place? You can set the label text at runtime, but for user input you will have to use a text box.

tetxbox with drop down control and auto complete

in my Application i have text box beside it i have drop down control.
when the user clicks on the drop down . a list of items under the drop down control should be shown. but if user type any value in the text box ( like tom, james, peter). if that value is there in the drop down . i should move the cursor to that value.
hope my Question is clear.
Any solution how to solve it would be great
thank you
what are you looking is,
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ComboBox/ComboBox.aspx
Just check it, Its autocomplete with dropdown
Sounds like you want something like the JQuery autocomplete plugin or if you prefer the ASP.NET AJAX Autocomplete control.
Edit- as you want a Combobox- JQuery has a lot of options for this. Here is one of them "Simple Combo".

C# dropdownmenuitem clicked and listview editing

I have 2 questions concerning C#.
1) I have a dropdown menu with several items in them. They are clickable, but when I click one, the older clicked one stays selected. Click another and the 2 original ones stay selected, and so on. I don't want this. What I want is that when I click one of the dropdownitems, that one is that selected one and the others are not.
2) I have a listview items on a winform. I loaded some string elements into it from a file. Now what I want to do is to be able to edit those strings and even add strings, just by clicking on the rows in which the data goes.
I've checked google and MSDN for these problems, but nothing helps, so I turn here.
2) The ListView does not support that type of action. You can roll your own (pain in the #$$), or perhaps a DataGrid would be better suited to your purpose.
EDIT:
This link may help
This one too
For #1 I'm a little confused. If the DropDownStyle isn't set to simple something strange is occuring. It's not much but maybe you could try recreating the control.
For #2 the easiest solution I can think of is to set a TextBox to be equal to the selected text value from your listview. After that write a little function to update the selected index of the listview with the edited text from the listview.
Please comment if you have any more information about #1.

Categories

Resources