无法向splitcontainer中的窗口添加事件 [英] cannot add events to window inside splitcontainer

查看:91
本文介绍了无法向splitcontainer中的窗口添加事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,每个人

我创建了主窗口并添加了一个splitcontainer。

然后我添加window1作为子主窗口将它添加到splitcontainer作为控件。

现在我想为window1创建新事件但是我不能这样做。

我尝试了以下活动:点击,移动,激活,鼠标中心,鼠标点击...但只有sizechanged和滚动事件是可能的。

我不知道为什么会这样。

请告诉我如何将click事件添加到window1

hello, everyone
I created "main window" and add a "splitcontainer" to it.
then I add "window1" as child "main window" and add it to "splitcontainer" as control.
NOW i want to create new event for "window1" but I cannot do it.
I tried events such as: click, move, actived,mouseenter, mouseclick...but only sizechanged and scroll event is possible.
I don''t know why is it so.
pls show me how to add click event to "window1"

推荐答案

如果子元素的''z-index与父元素相同,则子元素到达事件。或者父元素被禁用(无法点击)。

所以你可以尝试将window1的z-index设置为999999.

A child element is reach to an event if its'' z-index is the same as the parent one. Or the parent element is disabled(cannot click).
So you can try to set z-index of the "window1" to 999999.
document.getElementById('window1').style.zIndex = 999999;


这篇关于无法向splitcontainer中的窗口添加事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆