C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Independent WebMenus for single toolbar not working.

rated by 0 users
This post has 0 Replies | 1 Follower

Not Ranked
Posts 2
nsadowy Posted: Fri, Apr 10 2009 7:30 PM

I have created a toolbar that has two drop down buttons, and two independent menus.  Setting the second drop down button to the contextid of the 2nd menu doesn't seem to be working.  I always get the first menu for both buttons.

 Here is my code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="PQWeb.GIS.test" %>
<%
@ Register Assembly="C1.Web.Editor.3" Namespace="C1.Web.Editor" TagPrefix="C1WebEditor" %>
<%
@ Register Assembly="C1.Web.Command.2" Namespace="C1.Web.Command" TagPrefix="c1c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<
head runat="server">
<title></title>
<meta http-equiv="Content-Script-Type" content="text/javascript">
<script type="text/javascript">

function toggleParcels() {
alert(
'Called toggleParcels');
}
function togglePLSS() {
alert(
'Called togglePLSS');
}
function togglePoly() {
alert(
'Called togglePoly');
}
function toggleBuffer() {
alert(
'Called toggleBuffer');
}
function ToggleIconsMenu() {
alert(
'Called ToggleIconsMenu');
}
function toggleArrow() {
alert(
'Called toggleArrow');
}
function clearEverything() {
alert(
'Called clearEverything');
}
function clearParcels() {
alert(
'Called clearParcels');
}
function clearPLSS() {
alert(
'Called clearPLSS');
}
function clearPoly() {
alert(
'Called clearPoly');
}
function InteractiveDraw() {
alert(
'Called InteractiveDraw');
}
</script>

</head>
<
body>

<form id="form1" runat="server">
<div>
<c1c:C1WebToolBar ID="C1WebToolBar1" runat="server" BackColor="#E0DFE3" BorderColor="#8A867A"
BorderStyle="Solid" BorderWidth="1px" ItemPadding="2px" ItemSize="20px" ItemSpacing="1px"
Layout="Horizontal" Padding="2px">
<SeparatorStyle BackImageSize="5px" BackImageUrl="res:af_vertdelim20_03.gif" />
<MouseOverItemStyle BorderColor="White" BorderStyle="Outset" />
<ItemStyle BackColor="#E0DFE3" BorderColor="#E0DFE3" BorderStyle="Solid" BorderWidth="1px"
Font-Names="Tahoma" Font-Size="8pt" />
<Groups>
<c1c:C1WebToolBarGroup>
<Items>
<c1c:C1WebToolBarItem ClientScripts="" Text="Toggle"
DropDownContextMenuId="mnuToggle" HasDropDownButton="True">
</c1c:C1WebToolBarItem>
<c1c:C1WebToolBarItem ClientScripts="" Text="Clear"
DropDownContextMenuId="mnuClear" HasDropDownButton="True">
</c1c:C1WebToolBarItem>
</Items>
</c1c:C1WebToolBarGroup>
</Groups>
<DisabledItemStyle ForeColor="#9D9DA1" />
<SelectedItemStyle BackColor="#EFEEF0" BorderColor="White" BorderStyle="Inset" />
<MouseOverSelectedItemStyle BackColor="#EFEEF0" BorderColor="White" BorderStyle="Inset" />
</c1c:C1WebToolBar>
<c1c:C1WebMenu ID="mnuToggle" runat="server" BackColor="White"
BackImageUrl="res:af_officexpsmbk02.jpg" BorderColor="#8A867A"
BorderStyle="Solid" BorderWidth="1px" ContextMenu="Custom" GroupPadding="1px"
IconBarWidth="20px" ItemPadding="2px" ItemSpacing="1px" Layout="Vertical"

Padding="1px" SubMenuIconBarWidth="20px">

<SubMenuStyle BackColor="White" BackImageUrl="res:af_officexpsmbk02.jpg"

BorderColor="#9D9DA1" BorderStyle="Solid" BorderWidth="1px" />

<ItemStyle Font-Names="Tahoma" Font-Size="8pt" LabelPaddingLeft="5px"

LabelPaddingRight="5px" />

<DisabledItemStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="#ACA899"

LabelPaddingLeft="5px" LabelPaddingRight="5px" />

<MouseOverItemStyle BackColor="#C7C7CA" BorderColor="#A9A5B5"

BorderStyle="Solid" BorderWidth="1px" Font-Names="Tahoma" Font-Size="8pt"

LabelPaddingLeft="5px" LabelPaddingRight="5px" />

<Items>

<c1c:C1WebMenuItem ClientScripts="onclick:toggleParcels();" Text="Parcels">

</c1c:C1WebMenuItem>

<c1c:C1WebMenuItem ClientScripts="onclick:togglePLSS();" Text="PLSS">

</c1c:C1WebMenuItem>

<c1c:C1WebMenuItem ClientScripts="onclick:togglePoly();" Text="Polygon">

</c1c:C1WebMenuItem>

<c1c:C1WebMenuItem ClientScripts="onclick:toggleBuffer();" Text="Buffer">

</c1c:C1WebMenuItem>

<c1c:C1WebMenuItem ClientScripts="onclick:ToggleIconsMenu();" Text="Icons">

</c1c:C1WebMenuItem>

<c1c:C1WebMenuItem ClientScripts="onclick:toggleArrow();" Text="Arrow">

</c1c:C1WebMenuItem>

</Items>

<SeparatorStyle BackImageSize="3px" BackImageUrl="res:af_officexpdelim02.gif" />

<SelectedItemStyle Font-Names="Tahoma" Font-Size="8pt" LabelPaddingLeft="5px"

LabelPaddingRight="5px" />

<MouseOverSelectedItemStyle Font-Names="Tahoma" Font-Size="8pt"

LabelPaddingLeft="5px" LabelPaddingRight="5px" />

</c1c:C1WebMenu>

<c1c:C1WebMenu ID="mnuClear" runat="server" BackColor="White"

BackImageUrl="res:af_officexpsmbk02.jpg" BorderColor="#8A867A"

BorderStyle="Solid" BorderWidth="1px" ContextMenu="Custom" GroupPadding="1px"

IconBarWidth="20px" ItemPadding="2px" ItemSpacing="1px" Layout="Vertical"

Padding="1px" SubMenuIconBarWidth="20px">

<SubMenuStyle BackColor="White" BackImageUrl="res:af_officexpsmbk02.jpg"

BorderColor="#9D9DA1" BorderStyle="Solid" BorderWidth="1px" />

<ItemStyle Font-Names="Tahoma" Font-Size="8pt" LabelPaddingLeft="5px"

LabelPaddingRight="5px" />

<DisabledItemStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="#ACA899"

LabelPaddingLeft="5px" LabelPaddingRight="5px" />

<MouseOverItemStyle BackColor="#C7C7CA" BorderColor="#A9A5B5"

BorderStyle="Solid" BorderWidth="1px" Font-Names="Tahoma" Font-Size="8pt"

LabelPaddingLeft="5px" LabelPaddingRight="5px" />

<Items>

<c1c:C1WebMenuItem ClientScripts="onclick:clearEverything();" Text="Everything">

</c1c:C1WebMenuItem>

<c1c:C1WebMenuItem ClientScripts="onclick:clearParcels();" Text="Parcels">

</c1c:C1WebMenuItem>

<c1c:C1WebMenuItem ClientScripts="onclick:clearPLSS();" Text="PLSS">

</c1c:C1WebMenuItem>

<c1c:C1WebMenuItem ClientScripts="onclick:clearPoly();" Text="Polygon">

</c1c:C1WebMenuItem>

</Items>

<SeparatorStyle BackImageSize="3px" BackImageUrl="res:af_officexpdelim02.gif" />

<SelectedItemStyle Font-Names="Tahoma" Font-Size="8pt" LabelPaddingLeft="5px"

LabelPaddingRight="5px" />

<MouseOverSelectedItemStyle Font-Names="Tahoma" Font-Size="8pt"

LabelPaddingLeft="5px" LabelPaddingRight="5px" />
</c1c:C1WebMenu>
</div>
</form>
</
body>
</
html>

Page 1 of 1 (1 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.