PDA

View Full Version : Multiple toolbars emulation



Vladimir
Dec 29, 2008, 6:33 AM
Hi all,

This simple example shows how to emulate multiple toolbars. Maybe someone will consider it useful



<%@ 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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" runat="server" />

<ext:Panel runat="server" Title="Panel with multiple toolbars" Width="500">
<Body>
<ext:ContainerLayout runat="server">
<ext:Toolbar runat="server">
<Items>
<ext:ToolbarButton runat="server" Icon="Accept"></ext:ToolbarButton>
<ext:ToolbarButton runat="server" Text="Top Button1"></ext:ToolbarButton>
</Items>
</ext:Toolbar>

<ext:Toolbar runat="server">
<Items>
<ext:ToolbarButton runat="server" Icon="Bell"></ext:ToolbarButton>
<ext:ToolbarButton runat="server" Text="Top Button2"></ext:ToolbarButton>
</Items>
</ext:Toolbar>

<ext:Toolbar runat="server">
<Items>
<ext:ToolbarButton runat="server" Icon="Anchor"></ext:ToolbarButton>
<ext:ToolbarButton runat="server" Text="Top Button3"></ext:ToolbarButton>
</Items>
</ext:Toolbar>

<ext:Panel runat="server" Border="false" Height="300" BodyStyle="padding:6px;">
<Body>
Body
</Body>
</ext:Panel>

<ext:Toolbar runat="server">
<Items>
<ext:ToolbarButton runat="server" Icon="Accept"></ext:ToolbarButton>
<ext:ToolbarButton runat="server" Text="Bottom Button1"></ext:ToolbarButton>
</Items>
</ext:Toolbar>

<ext:Toolbar runat="server">
<Items>
<ext:ToolbarButton runat="server" Icon="Bell"></ext:ToolbarButton>
<ext:ToolbarButton runat="server" Text="Bottom Button2"></ext:ToolbarButton>
</Items>
</ext:Toolbar>

<ext:Toolbar runat="server">
<Items>
<ext:ToolbarButton runat="server" Icon="Anchor"></ext:ToolbarButton>
<ext:ToolbarButton runat="server" Text="Bottom Button3"></ext:ToolbarButton>
</Items>
</ext:Toolbar>
</ext:ContainerLayout>
</Body>
</ext:Panel>
</form>
</body>
</html>

hanxin2007
Mar 01, 2009, 11:47 PM
It's very userful to me , thank you!

dbassett74
Apr 17, 2009, 9:37 PM
I was looking for this as well. Thanks!

youyi1997
Jul 04, 2009, 12:40 PM
userfull...

sandeepan.kundu
Sep 24, 2009, 6:18 AM
The mentioned solution works well.

I had a situation where this solution worked was as following.


viewport=> borderlayout


In border layout north, requirements were
1. toolbar 1=> it will contain dynamic menus and sub menus assocated with toolbar button (on left), dynamic buttons (on right).
2. toolbar 2 => (optional),it will contain dynamic toolbar button.
3. toolbar 3 => (optional),it will contain dynamic toolbar button.


It works like cake.