开发者

C# What is the difference between Control.Focus() and Control.Select() [duplicate]

This question already has answers here: 开发者_如何学运维 Closed 12 years ago.

Possible Duplicate:

What's the difference between Control.Select() and Control.Focus()?

What is the difference between Control.Focus() and Control.Select()

And is it correct to assume that the form.ActiveControl invokes the Select method of the specified control?


The Focus() function actually performs the focussing on the control. The Select() function is higher-level, and tells the parent to select through the control's hierarchy.

There is loads of logic in the Select function to make custom controls work fully with the framework.

If all you want to do is literally call focus on the element, there is no advantage on using Select... it makes me wonder why Focus isn't kept as a private/protected function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜