PDA

View Full Version : [CLOSED] When button click, open the menu of button



supera
Feb 22, 2012, 4:38 PM
Hi!

I wish when I click in button, open the menu of button.
It´s possible?

Thanks for any help... follow a example: When click in 'Business' button, open then menu of 'Businnes' button



<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Test12.aspx.vb" Inherits="WebApplication3.Test12" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!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>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="resManagerSGCO" runat="server" Namespace="SuperaWeb.SGCO" />
<ext:Panel ID="panelCenter" runat="server" Region="Center" Flex="1" layout="FitLayout" BodyPadding="6" >
<TopBar><ext:Toolbar runat="server"><Items>
<ext:ButtonGroup ID="btgNegocios" runat="server" Title="Negócios" Columns="2">
<Items>
<ext:SplitButton runat="server" ID="btcNegocios" Text="Business" IconUrl="~/resources/images/toolbar/32x32/negocios.png" Scale="Large" ArrowAlign="Bottom" IconAlign="Top" RowSpan="3">
<Menu>
<ext:Menu ID="menuCotacoes" runat="server">
<Items>
<ext:menuitem runat="server" ID="mncRequisicoes" Text="Requisições" IconUrl="~/resources/images/toolbar/16x16/requisicoes.png" OnClientClick="addTab(#{tabWebExplorer}, 'Negocios.Requisicoes', 'Requisicoes');" />
<ext:menuitem runat="server" ID="mncCotacoes" Text="Cotações" IconUrl="~/resources/images/toolbar/16x16/cotacoes.png" OnClientClick="addTab(#{tabWebExplorer}, 'Negocios.Cotacoes', 'Cotações');" />
<ext:menuitem runat="server" ID="mncOrdemCompra" Text="Ordens de compra" IconUrl="~/resources/images/toolbar/16x16/ordem_compra.png" OnClientClick="addTab(#{tabWebExplorer}, 'Negocios.Ordem_Compra', 'Ordens de Compra');" />
<ext:menuitem runat="server" ID="mncOrdemServico" Text="Ordens de serviço" IconUrl="~/resources/images/toolbar/16x16/ordem_servico.png" OnClientClick="addTab(#{tabWebExplorer}, 'Negocios.Ordem_Servico', 'Ordens de Serviço');" />
<ext:menuitem runat="server" ID="mncCotacoes_Mapa" Text="Mapa de cotações" IconUrl="~/resources/images/toolbar/16x16/mapa_cotacoes.png" OnClientClick="addTab(#{tabWebExplorer}, 'Negocios.Cotacoes.Mapa', 'Mapa de cotações');" />
<ext:menuitem runat="server" ID="mncOrdemCompra_Mapa" Text="Mapa de compras" IconUrl="~/resources/images/toolbar/16x16/mapa_compras.png" OnClientClick="addTab(#{tabWebExplorer}, 'Negocios.Ordem_Compra.Mapa', 'Mapa de compras');" />
</Items>
</ext:Menu>
</Menu>
</ext:SplitButton>
</Items>
</ext:ButtonGroup>
</Items></ext:Toolbar></TopBar>
</ext:Panel>
</form>
</body>
</html>

Daniil
Feb 22, 2012, 5:14 PM
Hi,

Then please use a common Button instead of SplitButton.

supera
Feb 22, 2012, 5:23 PM
Works fine!

Thanks a lot.