Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Selecting multiple controls by mouse

Selecting multiple controls by mouse

Scheduled Pinned Locked Moved C#
questiontutorial
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    teknolog123
    wrote on last edited by
    #1

    Hi, I have a panel and custom controls on it. I know how to select multiple controls by clicking on an empty space on the panel and move the mouse but how can I do it if the panel is covered fully by controls and not visible? All I want is to click on any of the controls and drag the mouse on the other controls to select them. Any clue would be appreciated.Thanks

    A B 2 Replies Last reply
    0
    • T teknolog123

      Hi, I have a panel and custom controls on it. I know how to select multiple controls by clicking on an empty space on the panel and move the mouse but how can I do it if the panel is covered fully by controls and not visible? All I want is to click on any of the controls and drag the mouse on the other controls to select them. Any clue would be appreciated.Thanks

      A Offline
      A Offline
      Andre Kraak
      wrote on last edited by
      #2

      Does Ctrl+Mouse-click work?

      0100000101101110011001000111001011101001

      T 1 Reply Last reply
      0
      • A Andre Kraak

        Does Ctrl+Mouse-click work?

        0100000101101110011001000111001011101001

        T Offline
        T Offline
        teknolog123
        wrote on last edited by
        #3

        Thanks I did Ctrl+click, it works but I also want my users to select the controls with only one hand

        A 1 Reply Last reply
        0
        • T teknolog123

          Thanks I did Ctrl+click, it works but I also want my users to select the controls with only one hand

          A Offline
          A Offline
          Andre Kraak
          wrote on last edited by
          #4

          In that case you really need free space to start your mouse drag.

          0100000101101110011001000111001011101001

          T 1 Reply Last reply
          0
          • A Andre Kraak

            In that case you really need free space to start your mouse drag.

            0100000101101110011001000111001011101001

            T Offline
            T Offline
            teknolog123
            wrote on last edited by
            #5

            Thanks, at least I won't spend my time for a thing which is not possible.

            1 Reply Last reply
            0
            • T teknolog123

              Hi, I have a panel and custom controls on it. I know how to select multiple controls by clicking on an empty space on the panel and move the mouse but how can I do it if the panel is covered fully by controls and not visible? All I want is to click on any of the controls and drag the mouse on the other controls to select them. Any clue would be appreciated.Thanks

              B Offline
              B Offline
              BillWoodruff
              wrote on last edited by
              #6

              teknolog123 wrote:

              I did Ctrl+click, it works but I also want my users to select the controls with only one hand

              Just curious: I assume you are speaking here of "your users" as "design-time" consumers within Visual Studio ... where they have your Panel's source code within their own projects, and can manipulate any object inside the Panel, delete it, move it, etc., ... ? And the controls within your Panel (via use of Dock and Anchor) completely fill the Panel ... so if the user did resize it no Panel surface would be exposed ? best, Bill

              "Use the word 'cybernetics,' Norbert, because nobody knows what it means. This will always put you at an advantage in arguments." Claude Shannon (Information Theory scientist): letter to Norbert Weiner of M.I.T., circa 1940

              T 1 Reply Last reply
              0
              • B BillWoodruff

                teknolog123 wrote:

                I did Ctrl+click, it works but I also want my users to select the controls with only one hand

                Just curious: I assume you are speaking here of "your users" as "design-time" consumers within Visual Studio ... where they have your Panel's source code within their own projects, and can manipulate any object inside the Panel, delete it, move it, etc., ... ? And the controls within your Panel (via use of Dock and Anchor) completely fill the Panel ... so if the user did resize it no Panel surface would be exposed ? best, Bill

                "Use the word 'cybernetics,' Norbert, because nobody knows what it means. This will always put you at an advantage in arguments." Claude Shannon (Information Theory scientist): letter to Norbert Weiner of M.I.T., circa 1940

                T Offline
                T Offline
                teknolog123
                wrote on last edited by
                #7

                BillWoodruff wrote:

                Just curious: I assume you are speaking here of "your users" as "design-time" consumers

                No, I mean runtime users

                B 1 Reply Last reply
                0
                • T teknolog123

                  BillWoodruff wrote:

                  Just curious: I assume you are speaking here of "your users" as "design-time" consumers

                  No, I mean runtime users

                  B Offline
                  B Offline
                  BillWoodruff
                  wrote on last edited by
                  #8

                  teknolog123 wrote:

                  No, I mean runtime users

                  Hi, Now that it's clear this is a run-time scenario: curious to know if your goal is to have a visible selection rectangle appear, and for controls to visually indicate their selected state. Have you considered an alternative selection mechanism, such as a pop-up window that has TreeView with CheckBoxes where the Control hierarchy can be represented ... perhaps selected from a custom context menu ... that could possibly still enable you to stay in 'one-handed' mode ? Have you written your selection code already ? Are you still interested in pursuing this ? best, Bill

                  "Use the word 'cybernetics,' Norbert, because nobody knows what it means. This will always put you at an advantage in arguments." Claude Shannon (Information Theory scientist): letter to Norbert Weiner of M.I.T., circa 1940

                  T 1 Reply Last reply
                  0
                  • B BillWoodruff

                    teknolog123 wrote:

                    No, I mean runtime users

                    Hi, Now that it's clear this is a run-time scenario: curious to know if your goal is to have a visible selection rectangle appear, and for controls to visually indicate their selected state. Have you considered an alternative selection mechanism, such as a pop-up window that has TreeView with CheckBoxes where the Control hierarchy can be represented ... perhaps selected from a custom context menu ... that could possibly still enable you to stay in 'one-handed' mode ? Have you written your selection code already ? Are you still interested in pursuing this ? best, Bill

                    "Use the word 'cybernetics,' Norbert, because nobody knows what it means. This will always put you at an advantage in arguments." Claude Shannon (Information Theory scientist): letter to Norbert Weiner of M.I.T., circa 1940

                    T Offline
                    T Offline
                    teknolog123
                    wrote on last edited by
                    #9

                    BillWoodruff wrote:

                    Have you written your selection code already ?

                    Yes I did but not the way I wanted. What I wanted was to click on a control and move the mouse to the others (with the help of a visible selection rectangle) to select the controls which intersect with the selection rectangle What I did : I click the panel that contains all those controls (with a selection rec. visible only on the panel not the controls) and move the mouse.Intersection with rectangle logic is same the point is I don't want to enlarge the panel to leave a clicking space for selection.The panel should be invisible behind the controls

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups