I im doing a program to make a church management for my final year project of school, I have divide all the families that belong to the parish, and in each family there's several members (dad,mother,son,daughter,etc), I have the families divided my cods(famaly1,famaly2,famaly3) and also each family have a surname eg (Smith,Jones,Jackson)
now i know who ever uses the program will not know all the cods for all the family´s and i bet that the family's will not memorize there family cod so i want to make the search mode this way:
if the person search for the family cod then they will see
if the person searchs for the family surname they will see
now what i want to know its how i can program the list box? because when i double click on the list box when coding i can only program what happens when the user clicks on the list box and i cant program what will happen when the user clicks on the surname
thnx for any help
When you "double click" on the listbox using the visual editor, Visual Studio will generate the code-behind for the 'click' event for listbox.
Instead what you need to do is handle the ListControl's SelectedValueChangedEvent
That event is triggered when a user clicks on any ListControl Item.
The MSDN link I posted above has sample code to hookup to the event.
Related
I have a form that I created in Adobe Acrobat Professional that accepts approximately a dozen fields. I want to be able to validate phone numbers and emails using regular expressions but I'm unsure on how to do this. I know where to enter the custom script in the Validaiton tab of the field's properties but when I click on submit button nothing fires and Adobe launches the following window.
My submit action is set up like this.
It may not need to be done using validation. I'm not sure if this function is available to older versions of Acrobat, but in Acrobat X Pro, if you select the form field> right click> properties> Format> Special you can select pre-defined format of "Phone Number" for the phone number field and then possible input an arbitrary mask into the arbitrary mask field for the email one.
I believe the phone number one might be limited to USA phone numbers, but it's worth a shot and might be much simpler that writing code to validate it.
I am looking for People Picker Control similar to SharePoint one for MVC3 applications.
Can you please suggest if there are any such controls available?
What is the best approach to pick the people from AD in MVC3?
Requirement: On one of the Views, I need to select a user from AD.
I was thinking about People Picker kind of control.
Thanks
Arun
I know this is quite old so I doubt you still need this answered but perhaps it will be useful to someone else.
Just last week I had to build a control like does this for us. It's basically two main parts, a JSON service that accepts partial text and returns a list of suggestions and the HTML/CSS/jQuery+UI control.
The service is pretty straightforward so we'll skip over that here.
I'm in the process of doing a write-up on the web side but basically we wrapped the jQuery autocomplete with some custom CSS to make an input that is similar to the address line in GMail. This was done by styling a container div to look like a long input field. The actual input field is within that container and styled to be essentially invisible. Clicking in the container moves focus to the input box. Upon selecting a suggested name, I create a new container to insert before the 'cloaked' autocomplete input which contains the user name and a hidden input with our desired value to send along when the form is submitted. I had to do some other overloads on the autocomplete to get it to act consistently but essentially this is all there was to it.
The control looks at the container for a data-input-name attribute to figure out what 'name' to set the hidden inputs to when they are created with each user pick. When the form is submitted the default model binder rolls all the users of a particular picker (since you can have multiple on a page) into string arrays of the values - assuming your model has string array properties with the same name as used by the input controls - which we can then process on the server side.
By far the hardest part was figuring out the right HTML + CSS to get the look and feel right. I'm not a very strong UI person so this took me forever and still falls down in Chrome which seems to add an accent around input boxes even with (or because of?) styles which make it blend into the parent control.
For our purposes it's been working great over the last week.
UPDATE: It's now on GitHub with a Demo.
I'm designing user interface and want to ask your advises how to make it more user-friendly. Please tell any suggestions and if you have ever seen implementation of something familiar please share the link.
University. There are 40+ specialities grouped into 5 faculties. User choose several he is interested in and than orders them by priority.
For example I am interested in "programming microcontrollers", "system analysis" and "experimental physic". I must find them quickly in "programming faculty", select them and then order - what I prefer most and what I prefer less then others I select.
Any ideas welcome :)
Checkboxes and radio buttons would be appropriate for this, for both websites and desktop applications.
In my case I'd use the faculty names as headers and then add the according specialities below them, prefixed by checkboxes and radio button next to each speciality, allowing the user to set the priority.
A picture is worth a thousand words:
http://i45.tinypic.com/2ex6jy0.png
I would go for the "List builder" design pattern.
The list builder contains two lists. On the left side you have the source list (ie. the complete list of faculties/specialties), and on the right side you have the source list (the items chosen by the user in prioritized order).
Between the lists you have two buttons. "Add" (arrow to the right) and "Remove" (arrow to the left), wich adds and removes items to the destination list.
In addition you put two buttons along with the destination list. These are used for rearranging the destination list.
Eg. "Move up" and "Move down" for moving the selected item up and down.
Se examples:
http://msdn.microsoft.com/en-us/library/aa511484.aspx#listBuilders
http://osdpl.fluidproject.org/designPatterns/List-Builder
for example, we have a web form to let the user enter personal info such as address and phone number, then the user need to enter the spouse and dependents information. I usually use a gridview for this, but some users complain it is difficult to use. so what is the most user-friendly or conventional way to handle it?
thanks.
I usually use AJAX to do this. Usually a Button and/or programming triggered by an event to add form items.
For example:
Username:
Password:
(+) PHONE
.. then every time you add "+ PHONE" I would add a new set of text boxes for more phone numbers.
One option might be to have a more user-friendly form where the user fills in information for a single individual, and then an "add" button that takes the contents of the form and inserts it into the gridview where it can be reviewed while simultaneously clearing the rest of the form to allow another individual's info to be added.
Is it possible to use the default ComboBox control under VB6 to make it a smart ComboBox?
We suppose that the values are already populated in the ComboBox. For example:
New Delhi
New World
New York
We need the ComboBox to respond to one of the default events, so when for example the user writes 'N' the value in the ComboBox will be the first Value starting by 'N'. In our case it's New Delhi and then the user can continue typing till they write the exact word or he writes something different.
This technique is very used in web Application (for example in Google when you put the first word you will get a droped down list containing the suggestions).
But how to do that in VB6 :-(
In case its not possible, how can we keep the ComboBox droped down, the values changes when the text in the comboBox change and the first element in the ComboBox correspond to the first word starting by the value entered by the user?
Thanks a lot.
Actually I found an easy solution :) thanks to FreeVbCode uder Forms&Contorls Tab. There is a control named AutoControl. We can use it easly for our requirement.
http://www.freevbcode.com/ShowCode.Asp?ID=5944
Thanks.
You might also want to look at this control from vbAccelerator.com, which supports auto-completion. The vbAccelerator code is usually high quality. Of course you're introducing quite a dependency into your code whenever you use a third-party control.