Avoid splitter being focused?
-
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!
-
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!
-
Hi set the canFocus Property to false, the splitter shouldn't get the focus then greets m@u
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!
-
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!
-
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@uThanks 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!