1

I have LinkLabel. If i press hotkey, linklable got focus, but dotted area are not appear! When it got focus by 'Tab', he have dotted focus area:

enter image description here

Next, if press hotkey, dotted area always appear.

How do I get the dotted area immediately appeared with the help of hotkeys?

Nikolay
  • 587
  • 6
  • 20

1 Answers1

2

I found the problem. All the matter in the protected property ShowFocusCues. It is set to the false by default. When you focus control by the "Tab", ShowFocusCues set to the true.

It is an example how to set ShowFocusCues to true:

 public class UGLinkLabel : LinkLabel
    {
        private bool _displayFocusCues = true;

        protected override bool ShowFocusCues
        {
            get
            {
                return _displayFocusCues;
            }
        }

        public bool DisplayFocusCues
        {
            get
            {
                return _displayFocusCues;
            }
            set
            {
                _displayFocusCues = value;
            }
        }
    }
Nikolay
  • 587
  • 6
  • 20