Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发带有新样式触发器“IsFocusInside”的 TPanel。当面板内的一个子控件具有焦点并且我们完全没有焦点时,它将触发。我如何知道内部控件何时聚焦以及何时没有聚焦?我不知道我的面板中有什么类型和多少控件。肿瘤坏死因子。
您可以遍历控件(任何它们的子控件)并修补到 OnEnter(获得焦点)和 OnExit(失去焦点)事件。