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. Avoid splitter being focused?

Avoid splitter being focused?

Scheduled Pinned Locked Moved C#
5 Posts 2 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.
  • D Offline
    D Offline
    Dominik Reichl
    wrote on last edited by
    #1

    Hello! I've got a main dialog with two splitters. The problem is that after opening and closing a sub-dialog, one of the splitters gets the focus. Before opening a sub-dialog: Screenshot[^]. After closing the dialog: Screenshot[^]. How can I avoid that the splitter gets the focus? Best regards Dominik


    Too many passwords to remember? Try KeePass Password Safe!

    L 1 Reply Last reply
    0
    • D Dominik Reichl

      Hello! I've got a main dialog with two splitters. The problem is that after opening and closing a sub-dialog, one of the splitters gets the focus. Before opening a sub-dialog: Screenshot[^]. After closing the dialog: Screenshot[^]. How can I avoid that the splitter gets the focus? Best regards Dominik


      Too many passwords to remember? Try KeePass Password Safe!

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Hi set the canFocus Property to false, the splitter shouldn't get the focus then greets m@u

      D 1 Reply Last reply
      0
      • L Lost User

        Hi set the canFocus Property to false, the splitter shouldn't get the focus then greets m@u

        D Offline
        D Offline
        Dominik Reichl
        wrote on last edited by
        #3

        Hehe, tried that already :) Unfortunately, the CanFocus property is read-only. You also cannot override it in a derived class :(( Another idea?


        Too many passwords to remember? Try KeePass Password Safe!

        L 1 Reply Last reply
        0
        • D Dominik Reichl

          Hehe, tried that already :) Unfortunately, the CanFocus property is read-only. You also cannot override it in a derived class :(( Another idea?


          Too many passwords to remember? Try KeePass Password Safe!

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          well what you could try in a derived class would be the setStyle method: public class myFocusAvoidingSplitter:Splitter { public myFocusAvoidingSplitter() { SetStyle(ControlStyles.Selectable,false); } } hope that helps greets m@u

          D 1 Reply Last reply
          0
          • L Lost User

            well what you could try in a derived class would be the setStyle method: public class myFocusAvoidingSplitter:Splitter { public myFocusAvoidingSplitter() { SetStyle(ControlStyles.Selectable,false); } } hope that helps greets m@u

            D Offline
            D Offline
            Dominik Reichl
            wrote on last edited by
            #5

            Thanks for the tip! The splitter doesn't get the focus any more after the sub-dialog is closed. One problem remains, though. When clicking the splitter with the left mouse, it appears like this: Screenshot[^]. But I guess this can be solved somehow by handling the mouse events. Thanks a lot again!


            Too many passwords to remember? Try KeePass Password Safe!

            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