I Trying to switch Panel.TabStop
property totrue
but it does not affect anything.
How to enable TabStop
in a Panel
?
I Trying to switch Panel.TabStop
property totrue
but it does not affect anything.
How to enable TabStop
in a Panel
?
A Panel does not accept keyboard focus because a Panel is not a control (per se), it's a container for other controls which probably accept keyboard focus.
If you're trying to create a custom control, derive from UserControl or Control.
As I understand it, the TabStop property exists at the control level, but it really only affects what I would call interactive controls (there's probably an actual, correct term). Since panels can't directly receive the focus, they won't behave differently based on that flag.
As the others have said, the panel control will not accept focus. However, if you set TabStop to true and set its TabOrder, then the next control in the TabOrder should receive focus.
You have to put something that can accept focus onto it, like editbox. There you go :)