Dec 18, 2008, 11:26 AM
[CLOSED] Inherit KeyMap
Hi Im using key map on my main page. there I have a tabpanel that shows other (local) pages in iframes in each tab. Is it possible when in this tab in the ifram to be able to use the key map specified on the main page.
Here is a simple example of what my page looks like
<%@ Page Language="C#" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
tabpnlMain.ActiveTab.AutoLoad.Url = "http://www.google.se";
tabpnlMain.AutoLoad.Mode = LoadMode.IFrame;
tabpnlMain.ActiveTab.Load();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<script type="text/javascript">
</script>
<title>Example</title>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" Theme="Slate" runat="server" StateProvider="PostBack" />
<ext:TabPanel ID="tabpnlMain" runat="server" Border="true" Height="400" >
<Tabs>
<ext:Tab ID="tab1" runat="server" Title="Tab 1" >
</ext:Tab>
</Tabs>
</ext:TabPanel>
<ext:KeyMap ID="KeyMap1" runat="server" Target="={Ext.isGecko ? document : Ext.getBody()}" >
<ext:KeyBinding Alt="true" StopEvent="true" >
<Keys>
<ext:Key Code="W" />
</Keys>
<Listeners>
<Event Handler="Ext.Msg.alert('test','test');" />
</Listeners >
</ext:KeyBinding>
</ext:KeyMap>
</form>
</body>
</html>
/Mikael