[英]EmbeddedWB TAB key
I use EmbeddedWB
in edit mode and need to insert tab (4 *
) when user presses TAB key. 我用EmbeddedWB
在编辑模式下,需要插入选项卡(4 *
当用户按下TAB键。 I've trapped OnKeyDown
event and did the following: 我已经捕获了OnKeyDown
事件并执行以下操作:
if (Key = VK_TAB) then
begin
EditDesignerMsg.InsertHTML(' ');
EditDesignerMsg.EmbeddedWB.SetFocusToDoc;
end;
The problem is that this moves focus from the control to another control as usual with TAB in Windows. 问题在于,这与Windows中的TAB一样,将焦点从控件移至另一个控件。 I want to keep the focus within the web browser control and only move away to previous control if the user presses Shift + TAB . 我想将焦点保持在Web浏览器控件内,并且仅当用户按下Shift + TAB时才移至上一个控件。
How can this be done? 如何才能做到这一点?
Thanks to TLama, I've managed to do this by intercepting CM_DIALOGKEY message and applying the message handler which inserts specified HTML code at that point and then eats the message by setting AMessage.Result := 1;
多亏了TLama,我成功地做到了这一点,方法是截获CM_DIALOGKEY消息并应用消息处理程序,该处理程序在此时插入指定的HTML代码,然后通过设置AMessage.Result := 1;
吃掉消息AMessage.Result := 1;
. 。 More details how to implement this message handler can be found here: 可以在此处找到有关如何实现此消息处理程序的更多详细信息:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.