Jan 20, 2010, 5:27 AM
[CLOSED] cycle button - setActiveItem not removing currently selected menu item
Hello
I am having a problem with a cycle button. The problem that i am having is that i have a cycle button with three menu items. Menu item 'a' is selected by default, when a button is clicked i set the active item to 'b'. When i expand the cycle button, menu items 'a' and 'b' are both selected.
I have set up a simple page with a button and a cycle button, when the button is clicked a function is called that sets the active item of the cycle button. Sample code below.
Is there a method that i can call to delete the currently selected menu item and then set the active item or should the setActiveItem method clear the currently selected item?
Thank you
I am having a problem with a cycle button. The problem that i am having is that i have a cycle button with three menu items. Menu item 'a' is selected by default, when a button is clicked i set the active item to 'b'. When i expand the cycle button, menu items 'a' and 'b' are both selected.
I have set up a simple page with a button and a cycle button, when the button is clicked a function is called that sets the active item of the cycle button. Sample code below.
Is there a method that i can call to delete the currently selected menu item and then set the active item or should the setActiveItem method clear the currently selected item?
Thank you
<ext:Viewport ID="vptMain" runat="server" MonitorResize="true">
<Content>
<ext:FitLayout ID="FitLayout1" runat="server">
<Items>
<ext:Panel
ID="tabDetails"
runat="server"
Title="Details"
BodyStyle="padding:5px;">
<TopBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:CycleButton
ID="btnToggleCompletedRows"
runat="server"
ShowText="true"
PrependText="Showing ">
<Menu>
<ext:Menu ID="mnuToggleArchiveRows" runat="server">
<Items>
<ext:CheckMenuItem ID="CheckMenuItem1" runat="server" Text="Active Actions only" Checked="true" />
<ext:CheckMenuItem ID="CheckMenuItem2" runat="server" Text="Completed Actions only" />
<ext:CheckMenuItem ID="CheckMenuItem3" runat="server" Text="Active and Completed Actions" />
</Items>
</ext:Menu>
</Menu>
</ext:CycleButton>
</Items>
</ext:Toolbar>
</TopBar>
<Content>
<ext:FitLayout ID="FitLayout4" runat="server">
<Items>
<ext:Button ID="btnAdvancedSearch" runat="server" Icon="Zoom" Text="Search" ToolTip="Search">
<Listeners>
<Click Fn="actionsPerformAdvancedSearch" />
</Listeners>
</ext:Button>
</Items>
</ext:FitLayout>
</Content>
</ext:Panel>
</Items>
</ext:FitLayout>
</Content>
</ext:Viewport>
function actionsPerformAdvancedSearch() {
btnToggleCompletedRows.setActiveItem(CheckMenuItem3, true);
}