[CLOSED] Buttons in FormPanel Header bar

  1. #1

    [CLOSED] Buttons in FormPanel Header bar

    Hello!

    Is there any possibility to place few buttons in the header bar of FormPanel??

    Thanks in advance :)
    Last edited by geoffrey.mcgill; Oct 14, 2010 at 11:07 PM. Reason: [CLOSED]
  2. #2
    Hi,

    It's possible but there is no typical way to achieve this.

    What about the following way?

    Example
    <%@ Page Language="C#" %>
    
    <%@ 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>Ext.Net Example</title>
    
        <style type="text/css">
            .myClass {
                color: Red;
                font-size: 14px !important;
            }
        </style>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:FormPanel runat="server" Width="300">
            <TopBar>
                <ext:Toolbar runat="server">
                    <Items>
                        <ext:DisplayField runat="server" Text="Here is title" Cls="myClass"/>
                        <ext:ToolbarFill />
                        <ext:Button runat="server" Text="Button1" />
                        <ext:Button runat="server" Text="Button2" />
                    </Items>
                </ext:Toolbar>
            </TopBar>
            <Items>
                <ext:TextField runat="server" FieldLabel="Field 1" />
                <ext:TextField runat="server" FieldLabel="Field 2" />
            </Items>
        </ext:FormPanel>
        </form>
    </body>
    </html>
  3. #3
    Thanks for the answer, but it is not exactly what i needed.

    This solutions creates a toolbar under the FormPanel Header.
    When I assign a Title to the FormPanel, it is shown on the upper bar, and it is the bar i would like fill with two buttons.
    Is the any other way to achieve this ?
  4. #4
    Hi,

    Then I would suggest you to use FormPanel's header property
    http://dev.sencha.com/deploy/dev/doc...&member=header

    And these Ext.Element's methods:
    http://dev.sencha.com/deploy/dev/doc...er=appendChild
    http://dev.sencha.com/deploy/dev/doc...er=createChild
    http://dev.sencha.com/deploy/dev/doc...er=insertFirst
    http://dev.sencha.com/deploy/dev/doc...ber=insertHtml


    Something like this:
    FormPanel1.header.createChild("<button type='button'>Your button</button>");

Similar Threads

  1. [FormPanel] Buttons added dinamically
    By marcoslimagon in forum 1.x Help
    Replies: 17
    Last Post: Nov 17, 2011, 1:01 PM
  2. Replies: 0
    Last Post: Nov 17, 2011, 10:53 AM
  3. Add buttons into panel header.
    By flaviodamaia in forum 1.x Help
    Replies: 2
    Last Post: Nov 23, 2010, 5:22 PM
  4. [CLOSED] Buttons in FormPanel Content
    By voipswitch in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Oct 29, 2010, 12:12 PM
  5. [CLOSED] How to add buttons to panels header?
    By acrossdev in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 21, 2009, 7:34 AM

Posting Permissions