Perhaps you can help me. I am writing a windows application in VB.Net.
My client wants an intelligent combo box with type ahead capability. For example let’s I have a list of companies. I want to find my company “MetaPro”. With the Microsoft combo box if you type in the first letter of the name it will bring up first one starting with that letter. For example I type in “M” it will bring up “Mass. Dept. of Ed.”, I then type in “E” I get the first one starting with “E” maybe “E, G & G” where I want the first one starting with “ME”.
Perhaps there is an open source solution to this or I could create a custom control. But I don't know how. Any help or guidence would be appreciated.
In design view, change the AutoCompleteSource to ListItems and AutoCompleteMode to SuggestAppend for the comboBox.
Related
I am attempting to create a form that uses option buttons to assign a score, which would later be totaled for evaluation purposes. (I am using Word 2016 on Windows 10.)
Here is a pic of a portion of the proposed form, with 5 columns:Proposed Form
Here is a picture of the code I have attempted to use, which worked just exactly as I wanted it to "in EXCEL." Due to needs in other parts of the form, however we will be using Word, not Excel.Code Pic
Since we've decided to use Word, due to other features that Excel lacks, what code should I be using that would place a point value in the "Points" column? (I am assuming e2 to be the address of the 2nd row, 5th column?). I have spent 2 days so far trying to understand how to make this work. I know it can be done, but I lack the specific coding knowledge to make it happen. Thanks in advance for your help!
You appear to be using both formfields and ActiveX controls. It would be far simpler to use just formfields and, instead of having radio buttons, a simple dropdown for each item. That way, you don't need all those separate columns and the results could be tallied from the dropdown selections without the need for VBA.
I am currently building a User form for some letters we use at work and I would like to design the userform to generate the letter with mostly just checkboxes. e.g.
Your application cannot be completed until the following is received:
A Statutory declaration providing a statement in regards to your: financial situation
In the above example I would need two checkboxes.
Checkbox 1:
A statutory declaration providing a statement in regards to your:
Checkbox2:
financial situation
I guess the question I am asking is in two parts:
1: How do I get checkboxes to generate text?
2: How do I get multiple checkboxes to generate text against the same bookmark/s?
I may not need a Statutory Declaration, I may need a "certified copy of:" ---"bank details, proof of identity, proof of citizenship"
As you can tell from the user form it's pretty extensive and all the checkboxes in the lower half of the form need to generate text.
Grateful for any advice or direction or resources or anything.
In theory, you might store the text to be inserted in your letter in the Check box's caption property and use code to insert the text into your letter when the box is checked. I think this is cumbersome and recommend that you use the caption for a caption, for example, "Statutory declaration". If it is checked such a paragraph is inserted into the letter, else it is left out.
The required declaration may include one or several of many items. Since you are thinking of check boxes, you could have one for each "bank details", "proof of identity", "proof of citizenship". These selections are very short and could be placed in the caption property. But if the texts are longer or of greatly varying lengths I would recommend the use of text boxes instead. So, if Cbx1 is clicked, the text of Tbx1 is inserted etc.
Alternatively, if only one item is required you might consider a dropdown. Or you might use a list box with multiple choices. In principle, I think that using different systems for different levels of decision making helps the user to find his way through your form. For example, use check boxes to select paragraphs (the full text of which might be shown in adjacent text boxes), and then switch to list boxes, option buttons, dropdowns or check boxes which look completely different to specify the contents of the selected paragraph. All of that detail might as well be hidden until the user has checked its box.
I have this userform that i'm developing for my report formatting task. My whole code is finished, there are only 2 problems that i need to work on.
Making my VBA application work on every excel file that user choose
Exception Handling for ComboBoxes on my form.
(Edit: I hope trying to get attention of people who are interested in this question to another stackoverflow.com topic is not against forum rules)
You guys can reach first problem's topic from here: (There is already one suggestion but i'm little bit confused. So it would be super for alternative suggestions) http://bit.ly/VnF3cK
And about my second problem, when i click empty place of combobox, i can type whatever i want, but i want to restrict it, so users can only choose values [1-5] that i put inside of combobox. How can I achieve this?
In answer to your secondary question, you need to change the ComboBox's Style property to frmStyleDropDownList
I am creating a web control in vb.net that contains a list box. I know that I am able to choose a selection mode of Single or Multiple, but I am interested in limiting a Multiple selection to a predetermined size. For example preventing a user from selecting more than 3 items.
I have tried adding a Validator to the list box, which might be a way forward, but was wondering if there was a way of changing the selection mode to something a bit different than just the two specified ones.
Any ideas or suggestions would be greatly appreciated
Edit: Unfortunately due to project limitations I am unable to use Javascript on this problem. very annoying I know!
You could try handling one of the SelectedIndexChange events. With multiple selection, each time this event fires you can check how many items have already been selected. If it is more than you want, have the handler deselect the one that was just selected. You could also put up a little red label under the listbox saying "Sorry, no more than [n] selections allowed."
EDIT:
Just noticed you said WEB. Same theory applies, but it would have to be done using Javascript.
On the SelectedIndexChanged event, write a short piece of code that will check the number of selected items and if it is greater than your desired amount, unselect the new selection (or unselect the oldest one, or however you wish this to operate).
My winforms application will display 100 different names, and I will need the user to enter a number 1 through 4 next to each name. I will then store this data.
I know I can use the spreadsheet control, but is there something much simpler that I can use?
Maybe an array of textboxes or a datagrid?
You should be able to use a datagrid and have the first column contain a textbox Item and have a second column display a name. you should also be able to use a listview the same way. Although to be honest you might want a drop down box put in the gridview instead of a text box because with a dropdown/combo box you can make sure they input only a 1-4 because that will be there only options
I would recommend using a DataGrid. This will scale much better than an array of TextBoxes, and should do exactly what you need.
Why not use a numeric up/down control (spinner)?
Something like this would work well:
http://visualbasic.about.com/od/usingvbnet/l/aa082103a.htm
You can embed this in a custom field in a datagrid or repeater if necessary.
You can also just use a combobox:
http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.aspx
Depending on what you are using this for, you might also be able to use something like this:
http://www.codeproject.com/KB/miscctrl/cs_star_rating_control.aspx
Then the user can just click the value.
With either of these options at least your user wont have to enter a value manually and you can set bounds in the control instead of having to validate their input. Your last option should be the user entering a number into a textbox really.