Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What's this control called?

Tags:
  1. Sep 1, 2016 #1
    Hi,
    I'm developing an application and I allow a user to select 'things' they want enabled and others they do not. I had a solution coded but discovered a new solution. While I can 'hard' code this new solution, featured below, I was wondering if C# (the language I'm using) has the following control available;
    (essentially moving one 'thing' from the left hand column to the right with provided buttons)
    Capture.png
    Indeed, failing that, and the purpose of this question, does this method of allowing a user to select certain 'thing' from a list have a name?
    (please ignore the title of the window and other text, this is just an image I found to help explain my question)

    Many thanks
     
  2. jcsd
  3. Sep 1, 2016 #2

    phinds

    User Avatar
    Gold Member
    2016 Award

    As far as I know, the language used is irrelevant. The controls come from system calls that can be made from any language. There is no control that inherently moves an item from one list box (or text box if that's what you have) to another. You have to code that, but it's awfully simple.

    Since you are using the C# language, you must be using C#.NET as your IDE, in which case the selection of an item is called "item select". There are numerous sytem calls associated with items, such as adding an item, geting the index of a selected item, getting a selected item, setting the selection index in an item list, etc.
     
  4. Sep 1, 2016 #3

    Filip Larsen

    User Avatar
    Gold Member

    If you are looking for a more compact design of allowing a user to view and make "persistent" selections in a list, then you may consider using only a single ListView and then associate a checkbox with each item in the list. I believe that should be possible in Windows Forms by using the ListView.CheckBoxes property [1] and in WPF by using a template with a checkbox [2] or similar.

    If the selection is very short term (e.g. the selection is cleared each time the user is presented with the dialog) then Forms ListView.MultiSelect [3] or WPF ListView.SelectionMode [4] may be suitable instead, but since multiselection is not indicated the capability may easily remain undiscovered by the user.

    [1] https://msdn.microsoft.com/en-us/library/system.windows.forms.listview.checkboxes(v=vs.110).aspx
    [2] https://msdn.microsoft.com/en-us/library/ms754143(v=vs.110).aspx
    [3] https://msdn.microsoft.com/en-us/library/system.windows.forms.listview.multiselect(v=vs.110).aspx
    [4] https://msdn.microsoft.com/en-us/li...controls.listbox.selectionmode(v=vs.110).aspx
     
  5. Sep 1, 2016 #4

    jedishrfu

    Staff: Mentor

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: What's this control called?
  1. Call by reference (Replies: 11)

Loading...